20.05.2014, 11:24
DEFINE
CMD , This is /service rr
ONDIALOGRESPONSE
The problem is when i /service rr the OnDialogresponse doesn't Show to the Rapid Faction
I need help please , I really need help
pawn Код:
#define DIALOG_CHOOSINGFIX 3207
pawn Код:
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;
}
pawn Код:
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