[Tutorial] Stop player shooting on vehicles [First tutorial]
#4

I would suggest removing the weapon check if(GetPlayerWeapon(playerid) != 29) and just set the players armed weapon to 0 when they enter a car at all.

Like this
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
    {
   		SetPlayerArmedWeapon(playerid, 0);
    }
    return 1;
}
This code works, so whenever someone gets inside any seat of a car their weapons are set to fists.
Reply


Messages In This Thread
Stop player shooting on vehicles [First tutorial] - by MasonSFW - 14.05.2014, 03:01
Re: Stop player shooting on vehicles [First tutorial] - by Lordzy - 14.05.2014, 04:51
Re: Stop player shooting on vehicles [First tutorial] - by nilanjay - 14.05.2014, 05:09
Re: Stop player shooting on vehicles [First tutorial] - by ExtendedCarbon - 19.05.2014, 08:05

Forum Jump:


Users browsing this thread: 1 Guest(s)