Vip tag problem , plz help!
#1

Hello i have problem with vip tag , code is there.
Ingame the Viptag comes but every time if i select the work class like Trucker, comes One tag more .
Like if I die 2 times then i click spawn , and comes (VIP)(VIP)mynick:
How i can make only one vip tag Just need one tag ,.. please help
PHP код:
  if(APlayerData[playerid][PlayerLevel] >= 1)
{
    new 
oldname[MAX_PLAYER_NAME], newname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridoldnamesizeof oldname);
    
format(newnamesizeof newname"[VIP]%s"oldname);
    
SetPlayerName(playeridnewname);
    
SetPlayerColor(playerid0xFFFF00AA);
}
    return 
1;
   } 
Reply
#2

any?
Reply
#3

Just add a simple variable.
pawn Код:
new bool: isVIP[MAX_PLAYERS] = {false, ...};

  if(APlayerData[playerid][PlayerLevel] >= 1 && !isVIP[playerid])
{
    new oldname[MAX_PLAYER_NAME], newname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, oldname, sizeof oldname);
    format(newname, sizeof newname, "[VIP]%s", oldname);
    SetPlayerName(playerid, newname);
    SetPlayerColor(playerid, 0xFFFF00AA);
    isVIP[playerid] = true;
}
    return 1;
   }
Reply
#4

I have to add it to public OnPlayerDeath(playerid, killerid, reason)
{
??
Reply
#5

It says something undefined maxplayer
Reply
#6

have you defined max players in ur script if not then define it at top after includes or if you want tag creator then you can use my fs , there is a link under my signature.
Reply
#7

but how i add the ysi ??
i added the amx file to filterscripts , and added name to server.cfg ..
i got sscanf plugin .. but how i can install ysi
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)