04.05.2013, 18:07
Hi, I've been trying to make a simple dialog to place checkpoints (for newbies).
The problem is, when I come to compile it, I get
the #define:
the command, with a kill checkpoint.
my attempt of the dialog.
And yes, here is my OnDialogResponse
It's just your standard stuff, with a small if to kick NPC's.
The problem is, when I come to compile it, I get
Код:
warning 202: number of arguments does not match definition
Код:
#define DIALOG_MAP_SHOW 204987
Quote:
//MAP if (strcmp("/kc", cmdtext, true) == 0) { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_YELLOW, "You disabled your checkpoint."); return 1; } //Main Command if (strcmp("/map", cmdtext, true) == 0) { ShowPlayerDialog(playerid, DIALOG_MAP_SHOW, DIALOG_STYLE_LIST, "Map", "SAPD\nCity Hall\nAD Agency\nDMV\n24/7\nDMV\nArms Dealer\nTransFender\nPrison\nUnity Station\nBank\nVehicle Dealership\nMotel\nPig Pen (Whore Job)\nClothes (Binco)\nGym (Bodyguard)\nFire Department\nAirport\nLawyer", "Close", ""); format(string, sizeof(string), "%s pulls out map from their pocket. ((/map))", PlayerName(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); return 1; } |
Quote:
if(dialogid == DIALOG_MAP_SHOW) // MapDialog { if(response == 1) { switch(listitem) { case 0: /* LSPD */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1545.4938,-1675.8000,13.5605,98.9219, 4.0); } case 1: /* City Hall */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1481.4309,-1749.9603,15.4453,178.5093, 4.0); } case 2: /* AD */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1413.9763,-1700.6448,13.5395,57.8748, 4.0); } case 3: /* DMV */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1292.4683,-1548.7872,13.1185,200.1336, 4.0); } case 4: /* 24/7 */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1351.6475,-1754.5414,12.9161,195.1180, 4.0); } case 5: /* Arms Dealer */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1366.8694,-1275.0236,13.1047,325.9656, 4.0); } case 6: /* TransFender */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1043.0552,-1030.8632,31.6308,49.0630, 4.0); } case 7: /* Prison */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1803.3069,-1575.7050,12.9739,109.0811, 4.0); } case 8: /* Unity Station */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1741.3573,-1859.3196,12.9662,124.9390, 4.0); } case 9: /* Bank */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1459.9250,-1012.0630,26.3867,15.3483, 4.0); } case 10: /* Vehicle Dealership */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 2132.5500,-1147.4083,24.0677,186.1673, 4.0); } case 11: /* Motel */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 2228.7314,-1157.6272,25.3692,203.7747, 4.0); } case 12: /* Pig Pen */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 2420.8552,-1222.4554,24.8886,120.0242, 4.0); } case 13: /* Clothes */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 2251.6653,-1663.2877,15.0328,93.1109, 4.0); } case 14: /* Gym */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 2220.1411,-1713.2388,12.9406,172.1250, 4.0); } case 15: /* Fire Dept' */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1542.9463,-2185.1301,13.2313,56.9200, 4.0); } case 16: /* Airport */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1964.5305,-2198.8562,13.1103,184.4252, 4.0); } case 17: /* Law Firm (Lawyer Job) */ { SendClientMessage(playerid, COLOR_YELLOW, "Please follow the red triangle on your gps ((Mini-Map)) | Use /kc to cancel."); SetPlayerCheckpoint(playerid, 1375.1603,-1089.8044,25.2536,255.2936, 4.0); } } } } |
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(IsPlayerNPC(playerid)) { printf("OnDialogResponse: BotKick: %d", playerid); Kick(playerid); return 1; }