Admin command
#1

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
Reply
#2

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;
}
Reply
#3

Thanks but not found

please help me!
Reply
#4

oO.You said for admins! The script will show message in blue only if you is RCON admin
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)