/ask Bug
#1

So I've made a /ans system and when I use it in-game it spams the whole chat.
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;
}
Reply


Messages In This Thread
/ask Bug - by Quinncell - 21.06.2016, 12:13
Re: /ask Bug - by J0sh... - 21.06.2016, 12:15
Re: /ask Bug - by Quinncell - 21.06.2016, 12:29
Re: /ask Bug - by Konstantinos - 21.06.2016, 12:38
Re: /ask Bug - by Quinncell - 21.06.2016, 13:04
Re: /ask Bug - by Stinged - 21.06.2016, 14:36

Forum Jump:


Users browsing this thread: 1 Guest(s)