PDA

View Full Version : Vip tag problem , plz help!


Baumann
11/08/2013, 07:02 PM
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 if(APlayerData[playerid][PlayerLevel] >= 1)
{
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);
}
return 1;
}

Baumann
11/08/2013, 07:14 PM
any?

[XST]O_x
11/08/2013, 07:40 PM
Just add a simple variable.

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

Baumann
11/08/2013, 07:48 PM
I have to add it to public OnPlayerDeath(playerid, killerid, reason)
{
??

Baumann
11/08/2013, 08:22 PM
It says something undefined maxplayer

PrinceKumar
11/08/2013, 08:44 PM
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.

Baumann
12/08/2013, 06:56 AM
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