'Ask' Command Not Displaying Correctly?
#10

That's because you use 2 strtok's one "hogs" the first word, and the second one takes what's left.

You have 2 things in there to detect if the player rights nothing.. see why that might be considered pointless? Try this:

pawn Код:
if(strcmp(cmd, "/ask", true) == 0) // Available for everyone: ask a q to admins
    {
        {
        question = bigstr(cmdtext,idx);
        if(!strlen(question)) return SendClientMessage(playerid, ORANGE, "USAGE: /ask [Question]");
        else
            {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new question[128];
            format(string, sizeof(string), "%s Asks A Question: '%s'", sendername,question);
            SendClientMessageToAdmins(ADMIN_RED, string,1);
            SendClientMessage(playerid, GREEN, "Your question has been sent to the current online admins. Thank you.");
            }
        }
        return 1;
    }
Reply


Messages In This Thread
'Ask' Command Not Displaying Correctly? - by Alec24 - 15.03.2009, 02:42
Re: 'Ask' Command Not Displaying Correctly? - by Zoopaman - 15.03.2009, 03:08
Re: 'Ask' Command Not Displaying Correctly? - by Danut - 15.03.2009, 08:07
Re: 'Ask' Command Not Displaying Correctly? - by Alec24 - 15.03.2009, 11:48
Re: 'Ask' Command Not Displaying Correctly? - by Alec24 - 15.03.2009, 15:16
Re: 'Ask' Command Not Displaying Correctly? - by Weirdosport - 15.03.2009, 15:22
Re: 'Ask' Command Not Displaying Correctly? - by Alec24 - 15.03.2009, 15:27
Re: 'Ask' Command Not Displaying Correctly? - by Weirdosport - 15.03.2009, 15:28
Re: 'Ask' Command Not Displaying Correctly? - by Alec24 - 15.03.2009, 15:40
Re: 'Ask' Command Not Displaying Correctly? - by Weirdosport - 15.03.2009, 15:43

Forum Jump:


Users browsing this thread: 1 Guest(s)