15.11.2012, 04:21
I created a command called /findlocation and a dialog is ment to pop up and list all these places, and once you click on one, it creates a checkpoint. I finished the filterscript fine and then added it into the server.cfg file and when I go in game, nothing happens when I type the command?
Heres my filterscript.
Thanks in advance
Heres my filterscript.
Код:
#define FILTERSCRIPT #include <a_samp> #include <sscanf2> #include <zcmd> #if defined FILTERSCRIPT #endif public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/findlocation", true) == 0) { ShowPlayerDialog(playerid, 13, DIALOG_STYLE_LIST, "Locations List", "Mechanic Job \n Private Investigator Job \n Arms Dealer Job \n Deliverer Job \n Drug Smuggler Job \n Lawyer Job \n Guard Job \n Dealership \n Bank", "Select", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 13) { if(response) { new message[256+1]; if(listitem == 0) { format(message, 256, "A checkpoint has been placed at the Mechanic Job", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -2042.6096,140.3117,28.8359, 3.0); } if(listitem == 1) { format(message, 256, "A checkpoint has been placed at the Private Investigator Job", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -1926.5458,556.8484,35.1719, 3.0); } if(listitem == 2) { format(message, 256, "A checkpoint has been placed at the Arms Dealer Job", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -2135.8574,433.7958,35.1719, 3.0); } if(listitem == 3) { format(message, 256, "A checkpoint has been placed at the Deliverer Job", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid,-1720.1917,-127.8648,3.5489, 3.0); } if(listitem == 4) { format(message, 256, "A checkpoint has been placed at the Drug Smuggler Job", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -2104.4661,140.1358,35.0786, 3.0); } if(listitem == 5) { format(message, 256, "A checkpoint has been placed at the Lawyer Job", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -1703.3636,779.6036,24.8906, 3.0); } if(listitem == 6) { format(message, 256, "A checkpoint has been placed at the Guard Job!", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -1979.4202,170.3983,27.6875, 3.0); } if(listitem == 7) { format(message, 256, "A checkpoint has been placed at the Car Dealership", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -1957.5217,294.6539,35.4688, 3.0); } if(listitem == 8) { format(message, 256, "A checkpoint has been placed at the bank", listitem); SendClientMessage(playerid, 0xFFFFFFFF, message); SetPlayerCheckpoint(playerid, -1961.2853,441.0911,35.1719, 3.0); return 1; } } } return 1; }