PDA

View Full Version : DIALOGRESPONSE NOT SHOWING


cedizon
20/05/2014, 11:24 AM
DEFINE
#define DIALOG_CHOOSINGFIX 3207
CMD , This is /service rr
else if(strcmp(choice,"rr",true) == 0)
{
format(string, sizeof(string), "Repair\nRefuel\nTow");
ShowPlayerDialog(playerid, DIALOG_CHOOSINGFIX, DIALOG_STYLE_LIST, "{33CCFF}What type of assistance are you requiring?", string, "Select", "Cancel");
SetPVarInt(playerid, "ChoosingFix", 3207);
return 1;
}
ONDIALOGRESPONSE
if(dialogid == 3207)
{
if(response)
{
new zone[MAX_ZONE_NAME];
new Float:x, Float:y, Float:z;
GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
if(listitem == 0)
{
GetPlayerPos(playerid, x, y, z);
format(string, sizeof(string), "____________ RR DISPATCH PANEL _____________", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "REQUESTING: {FFFFFF}Repair");
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "DESTINATION: {FFFFFF}%s", zone);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "PHONE NUMBER: {FFFFFF}%i", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "____________________________________________", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "To accept this service request; (type /arapid %d)", playerid);
SendRadioMessage(14, COLOR_WHITE, string);

/*foreach(Player, i)
{
if(PlayerInfo[i][pJob] == 30 || PlayerInfo[i][pJob2] == 30)
{
SendClientMessageEx(i, COLOR_YELLOW, string2);
SendClientMessageEx(i, COLOR_YELLOW, string3);
SendClientMessageEx(i, COLOR_YELLOW, string4);
SendClientMessageEx(i, COLOR_YELLOW, string5);
}
}*/

DeletePVar(playerid, "ChoosingFix");
SetPVarInt(playerid, "RRCaller", 1);
RRCall[playerid] = playerid;
PlayerInfo[playerid][pServiceTime] = 30;
SendClientMessageEx(playerid, COLOR_WHITE, "A rapid-recovery worker will be dispatched to your current location within a few minutes");
}
else if(listitem == 1)
{
GetPlayerPos(playerid, x, y, z);
format(string, sizeof(string), "____________ RR DISPATCH PANEL _____________", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "REQUESTING: {FFFFFF}Refuel");
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "DESTINATION: {FFFFFF}%s", zone);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "PHONE NUMBER: {FFFFFF}%i", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "____________________________________________", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "To accept this service request; (type /arapid %d)", playerid);
SendRadioMessage(14, COLOR_WHITE, string);

/*foreach(Player, i)
{
if(PlayerInfo[i][pJob] == 30 || PlayerInfo[i][pJob2] == 30)
{
SendClientMessageEx(i, COLOR_YELLOW, string2);
SendClientMessageEx(i, COLOR_YELLOW, string3);
SendClientMessageEx(i, COLOR_YELLOW, string4);
SendClientMessageEx(i, COLOR_YELLOW, string5);
}
}*/

DeletePVar(playerid, "ChoosingFix");
SetPVarInt(playerid, "RRCaller", 1);
RRCall[playerid] = playerid;
PlayerInfo[playerid][pServiceTime] = 30;
SendClientMessageEx(playerid, COLOR_WHITE, "A rapid-recovery worker will be dispatched to your current location within a few minutes");
}
else if(listitem == 2)
{
GetPlayerPos(playerid, x, y, z);
format(string, sizeof(string), "____________ RR DISPATCH PANEL _____________", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "REQUESTING: {FFFFFF}Tow");
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "DESTINATION: {FFFFFF}%s", zone);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "PHONE NUMBER: {FFFFFF}%i", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "____________________________________________", PlayerInfo[playerid][pNumber]);
SendRadioMessage(14, COLOR_YELLOW, string);
format(string, sizeof(string), "To accept this service request; (type /arapid %d)", playerid);
SendRadioMessage(14, COLOR_WHITE, string);

/*foreach(Player, i)
{
if(PlayerInfo[i][pJob] == 30 || PlayerInfo[i][pJob2] == 30)
{
SendClientMessageEx(i, COLOR_YELLOW, string2);
SendClientMessageEx(i, COLOR_YELLOW, string3);
SendClientMessageEx(i, COLOR_YELLOW, string4);
SendClientMessageEx(i, COLOR_YELLOW, string5);
}
}*/

DeletePVar(playerid, "ChoosingFix");
SetPVarInt(playerid, "RRCaller", 1);
RRCall[playerid] = playerid;
PlayerInfo[playerid][pServiceTime] = 30;
SendClientMessageEx(playerid, COLOR_WHITE, "A rapid-recovery worker will be dispatched to your current location within a few minutes");
}
}
else
{
DeletePVar(playerid, "ChoosingFix");
return 0;
}
}


The problem is when i /service rr the OnDialogresponse doesn't Show to the Rapid Faction

I need help please , I really need help

Diverse
20/05/2014, 11:29 AM
Create a new variable string inside the command itself.

else if(strcmp(choice,"rr",true) == 0)
{

new iStr[80];
format(iStr, sizeof(iStr), "Repair\nRefuel\nTow");
ShowPlayerDialog(playerid, DIALOG_CHOOSINGFIX, DIALOG_STYLE_LIST, "{33CCFF}What type of assistance are you requiring?", iStr, "Select", "Cancel");
SetPVarInt(playerid, "ChoosingFix", 3207);
return 1;
}

cedizon
20/05/2014, 11:39 AM
Now the problem is spoofing

Diverse
20/05/2014, 11:41 AM
Mind elaborating.

cedizon
20/05/2014, 11:42 AM
What do you mean?

Diverse
20/05/2014, 11:44 AM
I'm basically trying to find out what's spoofing. The command itself, the dialog.

cedizon
20/05/2014, 11:46 AM
SPOOFING is not my problem my problem is when the player cmd /service rr, the Dialog not showing to the faction that should have the REPORT