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



ShowPlayerNameTagForPlayer - Super_Panda - 24.12.2011

pawn Код:
if (strcmp("/Invisible", cmdtext, true, 10) == 0)
    {
    if(PlayerInfo[playerid][Premiun]  >= 1)
    {
        ShowPlayerNameTagForPlayer(playerid, 0);
        SetPlayerColor(playerid,COLOR_INVISIBLE);
        SendClientMessage(playerid, COLOUR_WHITE, "Ahora Eres Invisible en el Mapa.");
        return 1;
    }
    else return SendClientMessage(playerid, COLOR_ROJO, "[Error]: Comando Solo Para Usuarios Premium Nivel 1");
    }
Im wondering if this command will remove player's tag (Health bar, Armour Bar, Nickname) and put the player invisible in the map.

Код:
C:\Users\Alex\Desktop\ladmin4v2.pwn(5398) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: ShowPlayerNameTagForPlayer - Ballu Miaa - 24.12.2011

Cause the function your using is incorrect syntax.
ShowPlayerNameTagForPlayer(playerid,giveplayerid, 0); it works for two player's u need to have a loop in my view for the other player to be i!
pawn Код:
if (strcmp("/Invisible", cmdtext, true, 10) == 0)
    {
    if(PlayerInfo[playerid][Premiun]  >= 1)
    {
        for(new i = 0;i <= MAX_PLAYERS;i++)
        {
            ShowPlayerNameTagForPlayer(playerid,i, 0);
        }
        SetPlayerColor(playerid,COLOR_INVISIBLE);
        SendClientMessage(playerid, COLOUR_WHITE, "Ahora Eres Invisible en el Mapa.");
        return 1;
    }
    else return SendClientMessage(playerid, COLOR_ROJO, "[Error]: Comando Solo Para Usuarios Premium Nivel 1");
    }