[Question] How to hide player name, when he is in vehicle?
#1

How to hide player name, when he is in vehicle?
Reply
#2

use ShowPlayerNameTagForPlayer(playerid, showplayerid, show);
Wiki : https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Some code:
pawn Код:
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;
}
Reply
#3

pawn Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)