// The map. //Disable Checkpoint 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, 1024, 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_PURPLE,COLOR_PURPLE); return 1; }
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);
#define DIALOG_MAP_SHOW 12516
ShowPlayerDialog(playerid, DIALOG_MAP_SHOW, DIALOG_TYPE, .....);
public OnDialogResponse( .. ) {
if(dialogid == DIALOG_MAP_SHOW)
{
// Do all that stuff with "inputtext" because that is what the user INPUT in the dialog
// Like setting checkpoints
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(IsPlayerNPC(playerid)) { printf("OnDialogResponse: BotKick: %d", playerid); Kick(playerid); return 1; } |
if(dialogid == 1024) // 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); } } } } |