problem with driveby
#1

How to disable Driveby?? look at this picture

Reply
#2

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;
}
Reply
#3

Can't find it.
Reply
#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
#5

Man you're the best <3 i will rep+ you when i have 50posts+, promise
but remind me hehe'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)