(A) tag with name - 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: (A) tag with name (
/showthread.php?tid=589510)
(A) tag with name -
sanamalik400 - 20.09.2015
hello samp,i want to know how to tag (A) with any admin,, and (Vip) with Vip player.. +1 for helper
Re: (A) tag with name -
Jastak - 20.09.2015
What do you mean?
Re: (A) tag with name -
thefirestate - 20.09.2015
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
Re: (A) tag with name -
sanamalik400 - 20.09.2015
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
Re: (A) tag with name -
sanamalik400 - 20.09.2015
I need this tag for all Admins not only one
Re: (A) tag with name -
thefirestate - 20.09.2015
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;
}
Re: (A) tag with name -
sanamalik400 - 20.09.2015
Your code looks good..i will try and post here result
Re: (A) tag with name -
sanamalik400 - 20.09.2015
bad results
not working