Disable drive-by.
#4

Add this to OnPlayerStateChange to disable drive-by.
pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate )
{
    if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER )
    {
        SetPlayerArmedWeapon( playerid, 0 );
    }
    return 1;
}
This can fail sometimes, so you can use OnPlayerUpdate. This small code in OnPlayerUpdate will not cause lag:
pawn Код:
public OnPlayerUpdate( playerid )
{
    if( IsPlayerInAnyVehicle( playerid ) )
    {
        SetPlayerArmedWeapon( playerid, 0 );
    }
    return 1;
}
Reply


Messages In This Thread
Disable drive-by. - by Tomejus - 02.03.2011, 07:00
Re: Disable drive-by. - by (SF)Noobanatior - 02.03.2011, 07:08
Re: Disable drive-by. - by Ironboy - 02.03.2011, 07:09
Re: Disable drive-by. - by Mean - 02.03.2011, 09:17
Re: Disable drive-by. - by Tomejus - 02.03.2011, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)