01.05.2013, 19:09
Hello all. I have this in my script when writing # in front of your chat example: #Hello.
This is the admin chat at my script. But Im wondering is there any possibility of changing this to /a instead?
Here is the code:
This is the admin chat at my script. But Im wondering is there any possibility of changing this to /a instead?
Here is the code:
pawn Код:
if(text[0] == '#' && (PlayerInfo[playerid][pAdmin] >= 1))
{
GetPlayerName(playerid,sendername,sizeof(sendername));
new arank[24];
if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Trial Administrator"; }
else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Normal Administrator"; }
else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Senior Administrator"; }
else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Lead Administrator"; }
else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Head Administrator"; }
else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Head of Admins"; }
else if(PlayerInfo[playerid][pAdmin] == 1337) { arank = "Scripter"; }
else if(PlayerInfo[playerid][pAdmin] == 1338) { arank = "Server Owner"; }
else { arank = "Unknown"; }
format(string, sizeof(string), "[%s] %s (%d): %s", arank, sendername, playerid, text[1]);
SendAdminMessage(COLOR_LIGHTRED, string);
printf("%s %s: %s",arank, sendername, text[1]);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s %s: %s",arank,d,m,y,h,mi,s,sendername, text[1]);
AdminChatLog(string);
return 0;
}