SA-MP Forums Archive
name hide - 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: name hide (/showthread.php?tid=590402)



name hide - saffierr - 28.09.2015

I am still able to see the players name above his head

PHP код:
CMD:hidename(playeridparams[])
{
    if(
PlayerInfo[playerid][VipLevel] == 1) return SendClientMessage(playeridCOLOR_RED"Error: You must be an V.I.P player level 2!");
    if(
PlayerInfo[playerid][VipLevel] < 2) return SendClientMessage(playeridCOLOR_RED"Error: You must be a V.I.P player!");
    for(new 
0MAX_PLAYERSi++)
    {
        
IsPlayerConnected(i);
         {
              
ShowPlayerNameTagForPlayer(playeridi0);
               
GameTextForPlayer(playerid"You have hidden your name for others"40003);
        }
    }
    return 
1;




Re: name hide - jihadmeneer - 28.09.2015

Try this:

PHP код:
CMD:hidename(playeridparams[]) 

    if(
PlayerInfo[playerid][VipLevel] == 1) return SendClientMessage(playeridCOLOR_RED"Error: You must be an V.I.P player level 2!"); 
    if(
PlayerInfo[playerid][VipLevel] < 2) return SendClientMessage(playeridCOLOR_RED"Error: You must be a V.I.P player!"); 
    for(new 
0MAX_PLAYERSi++) 
    { 
        
// IsPlayerConnected(i); This should give an error.
        
if (IsPlayerConnected(i))
         { 
              
ShowPlayerNameTagForPlayer(iplayerid0); // I and playerid should be changed check the wiki!
               
GameTextForPlayer(playerid"You have hidden your name for others"40003); 
        } 
    } 
        return 
1




Re: name hide - SnG.Scot_MisCuDI - 28.09.2015

try:
PHP код:
ShowPlayerNameTagForPlayeriplayerid0); 
from the wiki showing usage:
Код:
ShowPlayerNameTagForPlayer(forplayerid, playerid, 0)



Re: name hide - jihadmeneer - 28.09.2015

Quote:
Originally Posted by SnG.Scot_MisCuDI
Посмотреть сообщение
try:
pawn Код:
ShowPlayerNameTagForPlayer( i, playerid, 0);
Код:
ShowPlayerNameTagForPlayer(forplayerid, playerid, 0)
How would this possible work? He didn't define forplayerid, don't use this..


Re: name hide - SnG.Scot_MisCuDI - 28.09.2015

Quote:
Originally Posted by jihadmeneer
Посмотреть сообщение
How would this possible work? He didn't define forplayerid, don't use this..
I know.. That was the usage from the wiki.. i was showing how the first playerid is the 'Player who will see the results of this function' - wiki


Re: name hide - saffierr - 29.09.2015

Oh smart, ok I might try that.