Posts: 2,286
Threads: 18
Joined: Jun 2010
Quote:
Originally Posted by pmk1
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER ) { //If they got into a car from being on foot. if( GetVehicleModel(GetPlayerVehicleID( playerid )) == 428 || 429 || 430 || 431) { if( GetPlayerSkin(playerid) != 27 || 28 || 65 || 66 ) { //If their skin is not 27 //Remove them and send message. RemovePlayerFromVehicle( playerid ); SendClientMessage( playerid,0xFF000000, "Noredami vairuoti si transporta turite buti elektriku" );//-1 return 1; } else { SendClientMessage(playerid, 0xFF000000, "Atsisedote i transporta. Jeigu dirbate, tada dirbkite savo darba"); return 1; } } } return 1; }
it's better like this
|
I'm pretty sure using Switch and Case is better.