SA-MP Forums Archive
Vip tag problem , plz help! - 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: Vip tag problem , plz help! (/showthread.php?tid=457470)



Vip tag problem , plz help! - Baumann - 11.08.2013

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;
   } 



Re: Vip tag problem , plz help! - Baumann - 11.08.2013

any?


Re: Vip tag problem , plz help! - [XST]O_x - 11.08.2013

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;
   }



Re: Vip tag problem , plz help! - Baumann - 11.08.2013

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


Re: Vip tag problem , plz help! - Baumann - 11.08.2013

It says something undefined maxplayer


Re: Vip tag problem , plz help! - PrinceKumar - 11.08.2013

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.


Re: Vip tag problem , plz help! - Baumann - 12.08.2013

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