03.12.2017, 00:13
Alright so I have a problem with disabling checkpoint..
I added some checkpoints to help players to easier find requested location but once I reach to the checkpoint,
checkpoint don't want to disable
I don't know why this code doesn't work, I checked other checkpoints in script and that code disable checkpoint easly.
I added some checkpoints to help players to easier find requested location but once I reach to the checkpoint,
checkpoint don't want to disable
Код:
CMD:locate(playerid, params[]) { new location[32]; if(sscanf(params, "s[128]", location)) { SendClientMessageEx(playerid, COLOR_GREEN, "________________________________________________"); SendClientMessageEx(playerid, COLOR_YELLOW, "<< General & Job Locations, USAGE: /locate [location]>>"); SendClientMessageEx(playerid, COLOR_ORANGE, "General Locations: LSVIP , DMV, CrackLab, DrugHouse, Heroinlab"); SendClientMessageEx(playerid, COLOR_ORANGE, "Job Locations: Courier, Mechanic, Bodyguard, Bodyguard2 PizzaBoy, ArmsDealer, DrugDealer "); SendClientMessageEx(playerid, COLOR_ORANGE, "Job Locations: DrugSmuggler, Miner, LumberJack, Lawyer, Detective, Taxi"); return 1; } if(strcmp(params, "lsvip", true) == 0) { if(CheckPointCheck(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you have active checkpoint)."); SendClientMessageEx(playerid, COLOR_RED, "Checkpoint set to Los Santos DMV"); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 691.2667,-1276.0730,13.5605,2.0); } else if(strcmp(params, "dmv", true) == 0) { if(CheckPointCheck(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you have active checkpoint)."); SendClientMessageEx(playerid, COLOR_RED, "Checkpoint set to Los Santos DMV"); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1219.2233,-1812.1866,16.5938,2.0); } (.....more checkpoints...) return 1; }
Код:
DisablePlayerCheckpoint(playerid);