Wanted on Zone
#8

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.
Reply


Messages In This Thread
Wanted on Zone - by yancarlos4500 - 03.09.2013, 01:20
Re : Wanted on Zone - by Matnix - 03.09.2013, 01:42
Re: Wanted on Zone - by yancarlos4500 - 03.09.2013, 01:44
Re: Wanted on Zone - by yancarlos4500 - 03.09.2013, 01:51
Re : Wanted on Zone - by Matnix - 03.09.2013, 01:54
Re: Wanted on Zone - by yancarlos4500 - 04.09.2013, 09:21
Re: Wanted on Zone - by Threshold - 04.09.2013, 09:53
Re: Wanted on Zone - by TonyII - 04.09.2013, 09:57
Re: Wanted on Zone - by Threshold - 04.09.2013, 10:12
Re: Wanted on Zone - by yancarlos4500 - 04.09.2013, 19:45

Forum Jump:


Users browsing this thread: 1 Guest(s)