15.03.2009, 02:42
I have a command so people can ask questions to admins but when the message is sent the question is always missing the first word. Why?
For example if you type /ask How do i get a bullet. It will say <name> Asks A Question: do i get a bullet
Код:
if(strcmp(cmd, "/ask", true) == 0) // Available for everyone: ask a q to admins
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, ORANGE, "USAGE: /ask [Question]");
SendClientMessage(playerid, ORANGE, "FUNCTION: Will Ask The Specified Question To All Online Administrators.");
return 1;
}
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new question[128];
question = bigstrtok(cmdtext,idx);
if(!strlen(question)) return SendClientMessage(playerid, ORANGE, "USAGE: /ask [Question]");
format(string, sizeof(string), "%s Asks A Question: '%s'", sendername,question);
SendClientMessageToAdmins(ADMIN_RED, string,1);
format(string, sizeof(string), "Your question has been sent to the current online admins. Thank you.");
SendClientMessage(playerid, GREEN, string);
}
return 1;
}

