PDA

View Full Version : (A) tag with name


sanamalik400
20/09/2015, 12:56 AM
hello samp,i want to know how to tag (A) with any admin,, and (Vip) with Vip player.. +1 for helper

Jastak
20/09/2015, 01:21 AM
What do you mean?

thefirestate
20/09/2015, 01:23 AM
It depends on your script.
This is a way to make it check for the player name:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,24);
if(strcmp(tfname,"yourname",true) ==0)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{F81414}[{FFFFFF}YOURRANK{F81414}]{FFFFFF}%s[%i]: %s", pName, playerid, text);
SendClientMessageToAll(-1, String);
return 0;
}

It should be pasted under public OnPlayerText

sanamalik400
20/09/2015, 01:35 AM
I mean Attach (A) tag with player name if player Admin..
Simple a name is Sana..if Sana have admin level than attach tag and it show (A)Sana
In Main Chat

sanamalik400
20/09/2015, 01:38 AM
I need this tag for all Admins not only one

thefirestate
20/09/2015, 01:43 AM
In order to do this, you need the variable holding the admin level of the player
like:

if(PlayerInfo[playerid][AdminLevel] == 1) //This is a way to check the admin level, could be checked in different ways depends on the script.
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{F81414}[{F3FF02}Admin{F81414}]{F3FF02}%s[%i]: %s", pName, playerid, text);
SendClientMessageToAll(-1, String);
return 0;
}

sanamalik400
20/09/2015, 02:14 AM
Your code looks good..i will try and post here result

sanamalik400
20/09/2015, 06:17 AM
bad results :D not working :D