OnplayerKeyStateChane - Change - 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)
+--- Thread: OnplayerKeyStateChane - Change (
/showthread.php?tid=310041)
OnplayerKeyStateChane - Change -
Gooday - 10.01.2012
pawn Код:
forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys);public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH))
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
return cmd_lights(playerid);
}
}
With this the objects attack ti the vehicle by pressing H how i can set by pressing "2" ?
Re: OnplayerKeyStateChane - Change -
ScriptJorkis - 10.01.2012
pawn Код:
if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))