05.01.2012, 17:51
In Line:
It is specified what should be done if the player is not using the skin 287.
What should be done is the following:
replace the skin [skin_of_player] for the skin of type of player
Quote:
|
if( GetPlayerSkin(playerid) != 287) //naudoti || skinas || nepamirsti id 27 |
What should be done is the following:
Код:
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( CheckVehicle( GetPlayerVehicleID( playerid ) ) ) //naudoti || masina ||
{
if( GetPlayerSkin(playerid) != 287) //naudoti || skinas || nepamirsti id 27
{
//If their skin is not 27
//Remove them and send message.
RemovePlayerFromVehicle( playerid );
SendClientMessage( playerid,0xFF000000, "Noredami vairuoti si transporta turite buti kareiviu" );//-1
}
if( GetPlayerSkin(playerid) != [skin_of_player]) //naudoti || skinas || nepamirsti id 27
{
//If their skin is not [skin_of_player]
//Remove them and send message.
RemovePlayerFromVehicle( playerid );
SendClientMessage( playerid,0xFF000000, "Noredami vairuoti si transporta turite buti kareiviu" );//-1
}
else
{
SendClientMessage(playerid, 0xFF000000, "Atsisedote i transporta. Jeigu dirbate, tada dirbkite savo darba");
}
}
}
return 1;
}

