Hide Player Name - 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: Hide Player Name (
/showthread.php?tid=374836)
Hide Player Name -
CaTaLinU - 04.09.2012
How can i hide a players name when i put the target on him with a gun, in TAB to apear but if he is near i want to not apear his name
Re: Hide Player Name - HuSs3n - 04.09.2012
check this
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Re: Hide Player Name -
Penki4a - 04.09.2012
https://sampwiki.blast.hk/wiki/GetPlayerPos -use this with some floats to get the target's position.
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer -this is to hide the player name.
And from what i understood you need to play around a bit with IsPlayerInRangeOfPoint
Re: Hide Player Name -
C00K13M0N$73R - 04.09.2012
pawn Код:
stock IsPlayerAimingAtPlayer(playerid, targetid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if (IsPlayerAimingAt(playerid, x, y, z-0.75, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z-0.25, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z+0.25, 0.25)) return true;
if (IsPlayerAimingAt(playerid, x, y, z+0.75, 0.25)) return true;
return false;
}
pawn Код:
public OnGameModeInit()
{
ShowPlayerMarkers(0);
return 1;
}
Re: Hide Player Name -
[MM]RoXoR[FS] - 04.09.2012
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:X,Float:Y,Float:Z;
for(new i=0;i<MAX_PLAYERS;++i)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i,50,X,Y,Z)) ShowPlayerNameTagForPlayer(playerid, i, false);
else ShowPlayerNameTagForPlayer(playerid, i, true);
}
return 1;
}