Quote:
Originally Posted by _Khaled_
First add stock for admin chat..
pawn Код:
stock SendMessageToAdmins(color, const string[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(GetPVarInt > Level) { SendClientMessage(i, color, string); } } } return 1; }
CMD:a(playerid,params[]) { #pragma unused params //new pname[MAX_PLAYER_NAME]; //Your playername stock.. new string[128]; if(GetPVarInt > Level) { if(!strlen(params)) return SendClientMessage(playerid,COLOR_ERROR,"Usage: /ac (Message)");
//GetPlayerName(playerid, pname, sizeof(pname)); //Your player name stock.. format(string,sizeof(string), "[ADMIN MESSAGE] %s(%d): %s",pname, playerid, params); SendMessageToAdmins(COLOR_RED, string); return 1; } }
EDITED: to fit with your admin level defining
|
I'm have error in stock - SendMessageToAdmins.
in line: if(GetPVarInt > Level)