Quote:
Originally Posted by BenzoAMG
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_FIRE) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { if(GetPlayerWantedLevel(playerid) < 1) { SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1); } } } return 1; }
I have added the if(GetPlayerWantedLevel, because you don't want the player to continuously get an added wanted level. You can edit this code however you want, this is just an example of what is required.
|
I think it woul be better like KEY_FIRE & KEY_AIM, because you can't shoot without aiming on samp and if someone would just throw a random punch they'd get a wanted level.