11.07.2014, 20:44
So i been trying all day to make a /a command but it returns
So here's the two codes.
Command:
Stock
Now i have tried changing the "us" to "u"
Код:
sscanf warning: Format specifier does not match parameter count.
Command:
Код:
CMD:a(playerid,params[]){ new string[128]; if(PlayerInfo[playerid][pAdminLevel] <= 1) return SendClientMessage(playerid,COLOR_GREY,"You're not authorized to use this command!"); if(sscanf(params, "us")) return SendClientMessage(playerid,COLOR_GREY,"SYNTAX: /a(dmin) [message]"); else { format(string,sizeof(string),"%s: %d",GetName(playerid), params); SendToAdmins(COLOR_RED, string); } return 1; }
Код:
stock SendToAdmins(COLOR,message[])//here we set params for this stock, [] means string/message { for( new i = 0; i < MAX_PLAYERS; i++ ) if( PlayerInfo[i][pAdminLevel] <= 1 ) { SendClientMessage( i,COLOR,message ); } return 0; //for everyone else return 0; }