[Question] How to hide player name, when he is in vehicle? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Question] How to hide player name, when he is in vehicle? (
/showthread.php?tid=459013)
[Question] How to hide player name, when he is in vehicle? -
Micius - 19.08.2013
How to hide player name, when he is in vehicle?
Re: [Question] How to hide player name, when he is in vehicle? -
Aliassassin123456 - 19.08.2013
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;
}
Respuesta: [Question] How to hide player name, when he is in vehicle? -
JustBored - 19.08.2013
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;
}