Help Script Error 17: undefined symbol "ShowPlayerNameTag"
#1

I'm trying to hide the blood and armor of the player, but it's a bug
Код:
(114855) : error 017: undefined symbol "ShowPlayerNameTag"
114855 full code
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
     if(IsPlayerConnected(i))
     {
           ShowPlayerNameTag(i, playerid, 0);
     }
}
Reply
#2

I can't find the ShowPlayerNameTag on the SA-MP wiki, did you make it yourself?

You can disable hp/armor for all players by using a code similar to this
pawn Код:
public OnGameModeInit()
{
    ShowNameTags(0);
}
Reply
#3

Quote:
Originally Posted by Ghazal
Посмотреть сообщение
I can't find the ShowPlayerNameTag on the SA-MP wiki, did you make it yourself?

You can disable hp/armor for all players by using a code similar to this
pawn Код:
public OnGameModeInit()
{
    ShowNameTags(0);
}
I searched in this article
https://sampforum.blast.hk/showthread.php?tid=543135

Can you tell me where to put it?
When I put on public onplayerconnect, it's an error
Reply
#4

Quote:
Originally Posted by khanhbgpro
Посмотреть сообщение
I searched in this article
https://sampforum.blast.hk/showthread.php?tid=543135

Can you tell me where to put it?
When I put on public onplayerconnect, it's an error
It probably is removed then. Just use my code, put
pawn Код:
ShowNameTags(0);
under OnGameModeInit
Reply
#5

Quote:
Originally Posted by Ghazal
Посмотреть сообщение
It probably is removed then. Just use my code, put
pawn Код:
ShowNameTags(0);
under OnGameModeInit
Strictly speaking, I'm dealing with an anti name tag (cleo wall hack)
But when I use it, it only hides names without hiding blood and armor
Код:
#define MAX_DISTANCIA 30.0

// Gamemode init
SetTimer("AntiNameTag",500,true);


forward AntiNameTag();
public AntiNameTag()
{
    foreach(Player,playerid)
    {
        foreach(Player,i)
        {
            if(i == playerid)    continue;
            if(GetPlayerDistanceFromPlayer(playerid, i) <= MAX_DISTANCIA)
            {
                ShowPlayerNameTagForPlayer(playerid,i,true);
            }
            else
            {
                ShowPlayerNameTagForPlayer(playerid,i,false);
            }
        }
    }
}
Float:GetPlayerDistanceFromPlayer(playerid, targetid)
{
    new Float:Pos[3];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    return GetPlayerDistanceFromPoint(targetid, Pos[0], Pos[1], Pos[2]);
}
Reply
#6

help me
Reply
#7

Quote:
Originally Posted by khanhbgpro
Посмотреть сообщение
help me
This never works, because the wallhack have a semi timer 100ms to update players tags.
Reply
#8

its supposed to be ShowPlayerNameTagForPlayer...
alas
depending on your preference you can pick to use switch or the if's and else if's.
im not the best at scripting but i have a decent amount of experience. i can imagine that switch would be slightly faster.

PHP код:
stock ShowPlayerNameTag(playeridvalue)
{
    if(
value == 0)
    {
        for(new 
GetPlayerPoolSize(); != -1; --iShowPlayerNameTagForPlayer(playeridifalse);
    }
    else if(
value == 1)
    {
        for(new 
GetPlayerPoolSize(); != -1; --iShowPlayerNameTagForPlayer(playeriditrue);
    }
    else if(
value != || value != 1) return 0;
    return 
1;
}

stock ShowPlayerNameTag(playeridvalue)
{
    switch(
value)
    {
        case 
0:
        {
            for(new 
GetPlayerPoolSize(); != -1; --iShowPlayerNameTagForPlayer(playeridifalse);
        }
        case 
1:
        {
            for(new 
GetPlayerPoolSize(); != -1; --iShowPlayerNameTagForPlayer(playeriditrue);
        }
        else return 
0;
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)