SA-MP Forums Archive
VIP Tag - 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 (/showthread.php?tid=386781)



VIP Tag - Blackazur - 21.10.2012

How can i add a VIP Tag? Here a example: "[VIP]Blacky".

So i have define VIP:

Quote:

if(VIP[playerid] == 1)




Re: VIP Tag - Riddick94 - 21.10.2012

In SA-MP program change your nickname to [VIP]YourName.


Re: VIP Tag - gtakillerIV - 21.10.2012

PHP код:
if(VIP[playerid] == 1)
{
    new 
name[MAX_PLAYER_NAME], string[55];
    
GetPlayerName(playeridname,sizeof(name));
    
format(string,sizeof(string), "[VIP]%s",name);
    
SetPlayerName(playeridstring);

Add that code under OnPlayerSpawn, it might not work with OnPlayerConnect if you have to login..etc.


AW: VIP Tag - Blackazur - 21.10.2012

I have no errors, but when i am in game and i am VIP the [VIP] before the name come not. o.O


Re: VIP Tag - ThePhenix - 21.10.2012

I think, it would work fine...

PHP код:
public OnPlayerText(playeridtext[])
{
switch (
VIP[playerid] == 1
    {
    case 
0:
    {
    new 
string[128];
    
format(string,sizeof(string),"%s [%i]: {FFFFFF}%s",PlayerName2(playerid),playerid,text);
    
SetPlayerChatBubble(playeridtext0xFFFFFFFF100.010000);
    
printf(string);
    
SendClientMessageToAll(GetPlayerColor(playerid),string);
    return 
0;
    }
    case 
1:
    {
    new 
aName[MAX_PLAYER_NAME], string2[128];
    
GetPlayerName(playeridaName,sizeof(aName));
    
format(string2,sizeof(string2),"[VIP]: %s: %s",aName,text);//I think, it is the tag.
    
printf(string2);
    
SendClientMessageToAll(COLOR_CYAN,string2);//The message color
    
return 0;
    }
    }
    return 
1;