04.10.2011, 06:59
Hello, need little help here. I have a /helpme command which shows the dialog, player can type problem and send it to admin. But for some reason when player types i am not receiving the text. Any can tell what maybe the problem?
Dialog
Dialog Response
Dialog
Code:
if(strcmp(cmd, "/helpme", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(Mute[playerid] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
return 1;
}
else
{
if (Requesting_Help[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "Warning: You already have one helpme request waiting for response!");
if (HelperTimer[playerid] > 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Warning: You have to wait before submitting another Help Request!");
new helpmediatext[500];
format(helpmediatext, sizeof(helpmediatext), "You are requesting help, please do the following:\n -Write down your problem/question; \n -Your question must be clear; \n -Your question must be easy to read.");
ShowPlayerDialog(playerid, DIALOG_HELPME, DIALOG_STYLE_INPUT, "Help Request", helpmediatext, "Send", "Cancel");
return 1;
}
}
return 1;
}
Dialog Response
Code:
if(dialogid == DIALOG_HELPME)
{
if(response == 1)
{
if(strlen(inputtext) > 8)
{
new helpmetext[128];
Requesting_Help[playerid] = 1;
format(helpmetext, sizeof(helpmetext),"%s(ID:%i) is requesting help:%s",PlayerName(playerid),playerid,inputtext);
SendHelperMessage(COLOR_RED, helpmetext);
SendHelperMessage(COLOR_RED, "Type /ahm to accept his help request.");
HelperTimer[playerid] = 60;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTRED, "ERROR: Your message is too short, it must contain at least 8 characters");
}
}
if(response == 0)
{
SendClientMessage(playerid, COLOR_RED, "Action Canceled");
return 1;
}


