SA-MP Forums Archive
/handsup abuse - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /handsup abuse (/showthread.php?tid=77687)



/handsup abuse - killar456 - 13.05.2009

they do /handsup when cuffed or frozen and then punch and then unfrozen/uncuffed, and its getting annoying, is there a way to to fix this? or will i just have to keep kicking for it?

Code:
 	if(strcmp(cmd, "/handsup", true) == 0) {
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
		  SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
 	 		return 1;
		}
	}



Re: /handsup abuse - Weirdosport - 13.05.2009

Have an array called Froze[MAX_PLAYERS] and when you freeze a player set the value to 1 for that player. In the hands up script, check to see if the players value is 1, and if it is return 1/SendClientMessage(You're meant to be cuffed w/e);


Re: /handsup abuse - Donny_k - 13.05.2009

pawn Code:
TogglePlayerControllable( playerid, false );
Under the action code line, I don't know if it works under these conditions (actions) but it may so it's worth a shot.

If they can still get out then set the action under key state change, KEY_FIRE or whatever it is after using the above mentioned method of variables, instead of the message just set it again.