10.08.2015, 10:16
Код:
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[]) { if(dialogid==DIALOG_VOTEKICK && response) { if(IsVoteKickStarted == true) return SendClientMessage(playerid, COLOR_ERROR,"[ERROR:] {BBBBBB}A votekick has been already started. Wait until it finish to ask for a new one"); if(IsNumeric(inputtext)) StartVoteKick(strval(inputtext)); else { for(new i = 0; i<MAX_PLAYERS; i++) { GetPlayerName(playerid, name, sizeof(name)); if(!strcmp(inputtext, name, true)) { StartVoteKick(i); break; } } } if(PlayerToKick == -1) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR:] {BBBBBB}Player not found."); if(strval(inputtext) == playerid) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR:] {BBBBBB}You Cant Votekick yourself."); GetPlayerName(playerid, name2, sizeof(name2)); format(string, sizeof(string), "{C14124}%s{BBBBBB} has started a votekick for {C14124}%s{BBBBBB}. Type {60B149}Yes{BBBBBB} or {B35349}No{BBBBBB} to vote.", name2, name); SendClientMessageToAll(COLOR_OK, string); return 1; } return 1; }