How do I add this for admins! - 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: How do I add this for admins! (
/showthread.php?tid=385454)
How do I add this for admins! -
Eminem 2ka9 - 16.10.2012
I would like to add the following admin features.
If an admin level 1+ comments, it will appear as this in the chatbox "Admin [Admin Name]: [Admin Comment]
Example: "Admin Rafik: Ehhhhh"
The second thing I want is, if a player is admin level 1+, then his player blip will be pink.
Thanks for your help
Re: How do I add this for admins! -
newbienoob - 16.10.2012
Not tested because I don't have pawno with me right now.
PHP код:
if(IsPlayerConnected(playerid))
{
if(pInfo[playerid][Admin] >= 1) //Change this to your admin variable
{
new str[128],name[24];
GetPlayerName(playerid,name,24);
format(str,sizeof(str),"Admin %s(%d): {FFFFFF}%s",name,playerid,text[1]);
SendClientMessageToAll(GetPlayerColor(playerid), str);
return 0;
}
}
Re: How do I add this for admins! -
Eminem 2ka9 - 16.10.2012
I get 4 errors when i enter that in my gamemode.
Re: How do I add this for admins! -
newbienoob - 16.10.2012
Paste them here!
Re: How do I add this for admins! -
Eminem 2ka9 - 16.10.2012
PHP код:
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(1485) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(1565) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2233) : error 010: invalid function or declaration
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2235) : error 010: invalid function or declaration
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2238) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2241) : error 010: invalid function or declaration
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2244) : warning 203: symbol is never used: "name"
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2244) : warning 203: symbol is never used: "str"
Re: How do I add this for admins! -
newbienoob - 16.10.2012
Show me your OnPlayerText.
Re: How do I add this for admins! -
Eminem 2ka9 - 16.10.2012
Код:
public OnPlayerText(playerid, text[])
{
if(muted[playerid] == 1) return 0;
return 1;
}