Admin command - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Admin command (
/showthread.php?tid=127460)
Admin command -
spyware· - 13.02.2010
In several servers I saw a command of admin that when an adm logued speaks goes out the text i his(her,your) name in blue color like that:
[Clan] name [id]: hi
Can they help me? Thank you
Re: Admin command -
LuxurioN™ - 13.02.2010
Try this: (Not Tested):
pawn Код:
public OnPlayerText(playerid,text[])
{
if(IsPlayerAdmin(playerid))
{
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, 256, "%s[%d]: %s",name, playerid, text);
SendClientMessageToAll(COLOR_BLUE_HERE,string);
return 0;
}
return 1;
}
Re: Admin command -
spyware· - 13.02.2010
Thanks but not found
please help me!
Re: Admin command -
LuxurioN™ - 13.02.2010
oO.You said
for admins! The script will show message in blue only if you is RCON admin
Re: Admin command -
spyware· - 13.02.2010
The problem is that they give me mistakes! I put this in the calback OnPlayerText and error go out for me:
error 010: invalid function or declaration error 021: symbol already defined: "
error 010: invalid function or declaration
error 010: invalid function or declaration
I put a "if" in front of getplayer ... and there went out for me 4 error, all the same ones but in different linias:
error 010: invalid function or declaration error 010: invalid function or declaration error 010: invalid function or declaration error 010: invalid function or declaration
To, and if it was possible to put for the adm that are not RCON better
thank you