Need help to fix some command.
#1

So i have command like /ask peoples to ask questions and admins to read but i need something one time i created
it with timer btw it was not good


pawn Код:
if(strcmp(cmd,"/p",true)==0 || strcmp(cmd,"/pitaj",true)==0 || strcmp(cmd,"/ask",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Use: /pitaj [text]");
                return 1;
            }
            format(string, sizeof(string), "Question from %s-a: %s", sendername, (result));
            ABroadCast(COLOR_YELLOW2,string,1);
            SendClientMessage(playerid, COLOR_YELLOW2, "Your question is sended to admins.");
        }
        return 1;
    }
Reply


Messages In This Thread
Need help to fix some command. - by GBLTeam - 16.03.2011, 20:57
Re: Need help to fix some command. - by maramizo - 16.03.2011, 21:08
Re: Need help to fix some command. - by GBLTeam - 17.03.2011, 00:07
Re: Need help to fix some command. - by Marricio - 17.03.2011, 00:30
Re: Need help to fix some command. - by GBLTeam - 17.03.2011, 08:41
Re: Need help to fix some command. - by GBLTeam - 17.03.2011, 08:50

Forum Jump:


Users browsing this thread: 3 Guest(s)