VIP Tag
#1

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

So i have define VIP:

Quote:

if(VIP[playerid] == 1)

Reply
#2

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

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

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

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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)