22.04.2014, 14:22
it is set to true here are the commands:
Код:
CMD:ask(playerid, params[]) { new string[128], string2[256]; if (sscanf(params, "s[256]", Question[playerid])) return SendClientMessage(playerid, -1,""chat" Usage: /ask [question]"); if(QuestionAsked[playerid] == true) return SendClientMessage(playerid, -1,""chat""COL_RED" Wait for the response of your previous question!"); SendClientMessage(playerid,-1,""chat""COL_RED" Your question has been successfully sent to admins!"); format(string, sizeof(string),""chat" {FF0000}%s (%d) has asked a question, use /answer %d to answer it!", PlayerName(playerid),playerid,playerid); SendMessageToAllAdmins(string, -1); format(string2, sizeof(string2),""chat" {FF0000}Question: %s", Question[playerid]); SendMessageToAllAdmins(string2, -1); QuestionAsked[playerid] = true; return 1; } CMD:answer(playerid, params[]) { new targetid, string[256], string2[256]; if (sscanf(params, "is[256]", targetid, string)) return SendClientMessage(playerid,-1,""chat" Usage: /answer [playerid] [answer]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1,""chat""COL_RED" Player is not connected/online."); if(QuestionAsked[playerid] != true) return SendClientMessage(playerid, -1,""chat""COL_RED" This player has not asked a question!"); QuestionAsked[playerid] = false; SendClientMessage(playerid,-1,""chat""COL_RED" Your answer has been successfully sent!"); format(string2, sizeof(string2),""chat""COL_RED" Answer: %s", string); SendClientMessage(targetid, -1, string2); SendClientMessage(targetid,-1,""chat""COL_RED" Your question got answered."); return 1; }