19.08.2013, 18:33
How to hide player name, when he is in vehicle?
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
}
else
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(playerid, i, 1);
}
}
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid,0);
}
}
return 1;
}