problem with driveby
#4

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
This, searching could help you, but sometimes people do not have common sense

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) // Player entered a vehicle as a driver or passenger
    {
        return SetPlayerArmedWeapon(playerid, 0);
    }
    return true;
}
It's better not to check the oldstate at all because if a player is passenger and he/she gets in a vehicle with a command or something (as driver), it won't set armed weapon to fist.


Quote:
Originally Posted by Antoniohl
Посмотреть сообщение
Can't find it.
Anti drive-by
Reply


Messages In This Thread
problem with driveby - by Antoniohl - 06.01.2014, 13:20
Re: problem with driveby - by Patrick - 06.01.2014, 13:25
Re: problem with driveby - by Antoniohl - 06.01.2014, 13:34
Re: problem with driveby - by Konstantinos - 06.01.2014, 14:04
Re: problem with driveby - by Antoniohl - 06.01.2014, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)