name hide
#1

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;

Reply
#2

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

Reply
#3

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

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..
Reply
#5

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
Reply
#6

Oh smart, ok I might try that.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)