03.12.2012, 12:05
Use it on command.
Or just
pawn Код:
if( DM[ playerid ] == true ) return SendClientMessage( playerid, -1, "You cannot spawn a vehicle during DM!" );
// code for spawning vehicle
pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
{
if( DM[ playerid ] == true ) DestroyVehicle( GetPlayerVehicleID(playerid) );
}
return 1;
}