public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER && oldstate != PLAYER_STATE_DRIVER) // Player enters the vehicle as driver { SendClientMessage(playerid, WHATEVERCOLORHERE, "Welcome in the vehicle, dear sir. :)"); } return 1; }
///put on OnPlayerEnterVehicle public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(ispassenger == 0) { GameTextForPlayer(playerid, "~y~Welcome to ~r~vehicle", 5000, 4); } return 1; }
// OnPlayerEnterVehicle
GetPlayerVehicleSeat(playerid) == 2)
{
SendClientMessage(playerid,color,"Welcome To The Vehicle...");
return 1;
}
dude... Don't double post or bump before 24hrs next have you tried:
pawn Код:
|
Here you go I help you
Код:
///put on OnPlayerEnterVehicle public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(ispassenger == 0) { GameTextForPlayer(playerid, "~y~Welcome to ~r~vehicle", 5000, 4); } return 1; } |
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 ) { if( GetPlayerSkin(playerid) != 27 ) { //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; }
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 ) { if( GetPlayerSkin(playerid) != 27 ) { //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, "Welcome in the vehicle, dear sir. :)"); return 1; } } } return 1; }