02.02.2013, 09:30
Try this:
pawn Код:
CMD:answer(playerid, params[])
{
new ID, string[256], string2[256];
if(pInfo[playerid][Adminlevel] < 1)return SendClientMessage(playerid, 0xFF0000FF, "You are not authorised to use this command");
if (sscanf(params, "us[256]", ID, string)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /answer [ID] [Answer]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_RED, "ERROR: This player is not connected!");
if(QuestionAsked[ID] != true) return SendClientMessage(playerid, COLOR_RED, "ERROR: This player has not asked a question!");
QuestionAsked[ID] = false;
format(string2, sizeof(string2), "ANSWER: %s", string);
SendClientMessage(ID, COLOR_GREEN, string2);
return 1;
}