Freeze/surrender command
#1

Hello guys,i was wondering how i can apply the 'surrender' animation,and how to make it normal(no animation using a command?

Thanks
Reply
#2

I think i know what you mean by surrender i might be wrong. You press enter to clear it.
pawn Код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
Reply
#3

I want to type '/freeze [player id]' that player freezes(cant move) and only the person that has frozen that player can unfreeze.

Can i use 'toggleplayercontrolable'?
Reply
#4

Yes use TogglePlayerControllable(playerid, false); to freeze.
Reply
#5

Also i have 1 more question..... Lets say i /cuff a player, i want the cuffed player to freeze if he gets to far away from me.how?
Reply
#6

Quote:
Originally Posted by [JnA]DukeNukem
Посмотреть сообщение
Also i have 1 more question..... Lets say i /cuff a player, i want the cuffed player to freeze if he gets to far away from me.how?
Create a timer and get your pos and the other players pos and use IsPlayerInRangeOfPoint to check if he is in range, if not > TogglePlayerControlable
Reply
#7

Could you post an example timer(never really used timers)?
thanks
Reply
#8

Quote:
Originally Posted by [JnA]DukeNukem
Посмотреть сообщение
Could you post an example timer(never really used timers)?
thanks
Maybe you should be advertising that you make gamemodes for cash if you don't even know how a timer or TogglePlayerControllable works.
Reply
#9

Quote:
Originally Posted by [JnA]DukeNukem
Посмотреть сообщение
Could you post an example timer(never really used timers)?
thanks
pawn Код:
new freezetimer;
forward TimerExample(playerid);
public TimerExample(playerid)
{
 GetPlayerPos(playerid);
 return 1;
}

if(!strcmp("/arrest", cmdtext, true))
{
 freezetimer = SetTimerEx("TimerExample", 500, 1, "d", playerid);
}

if(!strcmp("/lawl", cmdtext, true))
{
 DestroyTimer(freezetimer);
}
Something like this will do just fine (of course you need to get the ID and stuff but it'll work
Reply
#10

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Maybe you should be advertising that you make gamemodes for cash if you don't even know how a timer or TogglePlayerControllable works.
Use search, there are plenty of tutorials on timers. Also look on the wiki. Posting here should be a last resort.

EDIT: Sorry not been up long still tierd, i didn't mean to have a go.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)