ShowPlayerDialog(playerid,33215,DIALOG_STYLE_INPUT,"Requesting Assistance","You have chosen to request assistance from an admin. If you are wanting to report a rule breaker/n then please use /report. An admin will be with you shortly after you sumbit this.","Sumbit Help","Cancel");
pawn Код:
|
if(dialogid == 33215) //ASSISTANCE DIALOG XKNIIVES
{
if(response)
{
new string[128];
if(strlen(inputtext) >= 150)
{
DisplayDialogForPlayer(playerid, 33215); //ASSISTANCE
SendClientMessage(playerid, COLOR_GREY, " Your request is too long [MAX: 150 CHARACTERS]");
return 0;
}
if(!strlen(inputtext))
{
DisplayDialogForPlayer(playerid, 33215); //ASSISTANCE
SendClientMessage(playerid, COLOR_GREY, " Fill in the box!");
return 1;
}
SendClientMessage(playerid, COLOR_YELLOW, " We have sumbitted your assistance request to all online admins!");
format(string, sizeof(string), "Assistance Report from: %s[%d]", PlayerName(playerid), playerid);
ABroadCast(COLOR_LIGHTBLUE,string,1);
format(string, sizeof(string), "Text: %s", inputtext);
ABroadCast(COLOR_LIGHTBLUE,string,1);
ABroadCast(COLOR_LIGHTBLUE,"Type '/aass' to accept or 'dass' to decline this assistance request",1);
PlayerNeedsAssistance[playerid] = 1;
SetTimerEx("AssistanceReset", 60000, false, "i", playerid);
}
}