22.11.2013, 00:57
Olб, queria saber se existe alguma funзгo que faзa com que eu saiba os ID's dos players que estiverem de carona em um veнculo.
Obrigado
Obrigado
new playa;
playa = ReturnUser(tmp);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
Aah, nгo tinha entendido direito, mas acho que й assim:
pawn Код:
|
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new playerState = GetPlayerState(playerid);
if(playerState == PLAYER_STATE_PASSENGER)
{
new pName[MAX_PLAYER_NAME], strtestis[40];
GetPlayerName(playerid, pName, sizeof(pName));
format(strtestis, sizeof(strtestis), "O Player Que estб como passageiro й ID: %d", playerid);
SendClientMessageToAll(0xFFFF00FF, strtestis);
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER)
{
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa, sizeof(playa));
format(gstring, sizeof(gstring), "%s ID %d entrou na carona do veнculo.", playa, playerid);
ProxDetector(30.0, playerid, gstring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}