24.08.2013, 17:40
When a player enter in a car and sit at the driver seat, i want to server send him a message, only to the driver, not to passangers in the car !
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( newstate == PLAYER_STATE_DRIVER )
{
// Send a message to the new driver!
}
return 1;
}
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( newstate == PLAYER_STATE_DRIVER )
{
SendClientMessage(playerid, color, "You are the driver of this vehicle!");
}
return 1;
}
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid) == 420)
{
SendClientMessage(playerid, color, "You are the driver of this vehicle!");
}
return 1;
}
pawn Код:
|
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( newstate == PLAYER_STATE_DRIVER)
{
if (GetPlayerVehicleModel(GetPlayerVehicleID(playerid)) == 420)
{
SendClientMessage(playerid, color, "You are the driver of this vehicle!");
}
}
return 1;
}