21.06.2016, 12:13
So I've made a /ans system and when I use it in-game it spams the whole chat.
Here is the code
Here is the code
Код:
CMD:ask(playerid,params[]) { new string[128],playername[24]; if(sscanf(params,"s[128]",params)) return SendClientMessage(playerid, COLOR_YELLOW,"[COMMAND]{FFFFFF} Usage:{FFFF00} /ask [question]"); GetPlayerName(playerid,playername,24); format(string,sizeof(string),"[QUESTION]{FFFFFF} %s has asked a question: %s [Use /ans to answer answer]",playername,params); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(playerid)) { if(pInfo[playerid][Adminlevel] >= 1) { SendClientMessage(playerid,COLOR_ORANGE,string); } } } return 1; }