Jump to content

PutHandsUp not working?

Recommended Posts

I trying to get a Ped to put there hands up.  I set up a suspect to aim a gun at them, but the victim refuses to raise there hands.  This is the code im using:

Clerk.Tasks.PutHandsUp(99999999 ^ 9999, Robber);


Share this post

Link to post
Share on other sites

What language are you using?
in VB.net, the ^ operator raises the int on the left to the power on the right.  The number is not infinity as google suggests, but is very large:

in VB.net, the maximum value of an int is:  2,147,483,647  (which is infinitely less than infinity)

Try this:

Clerk.Tasks.PutHandsUp(999999, Robber);
Clerk.Tasks.PutHandsUp(int.MaxValue, Robber);

Things to check after trying that code...
1. Make sure that you are not calling the task constantly (eg: in a tick type method), ped tasks when reset too quickly will result in the action being canceled.
2. Make sure that neither the clerk or the robber are null at the time it's called.


Edited by rushlink

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...