12.08.2013, 16:27
Hi
I am making a job and it loads the first checkpoint and second checkpoint but on the last chckpoint it does everything its suppose todo but it doesnt set the player checkpoint back to HQ
This is were it isnt setting the player checkpoint... It freezes the player and says "Head back to HQ" but doesnt set the checkpoint
Please help me !
I am making a job and it loads the first checkpoint and second checkpoint but on the last chckpoint it does everything its suppose todo but it doesnt set the player checkpoint back to HQ
Код:
public OnPlayerEnterCheckpoint(playerid) { //Fedex Job if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 498) { if(FEDEXCPT[playerid] == 1) { ShowPlayerDialog(playerid, DIALOG_FEDEXD, DIALOG_STYLE_LIST, "Fedex Delivery", " Car Parts \n 24/7 Items \n Crop Seeds", "Select", "Cancel"); FreezePlayer(playerid, 1); } //Car Parts if(FEDEXCPT[playerid] == 2) { FEDEXCPT[playerid] = 3; SetPlayerCheckpoint(playerid, -2132.1865, -125.8788, 35.5553, 10); FreezePlayer(playerid, 5); new string[18]; format(string, sizeof(string), "Unloading van"); GameTextForPlayer(playerid, string, 3000, 3); SendClientMessage(playerid, 0x0090F2FF, "Head back to HQ to get your pay!"); return 1; } if(FEDEXCPT[playerid] == 3) { FEDEXCPT[playerid] = 0; DisablePlayerCheckpoint(playerid); new cash = random(6000); GivePlayerMoney(playerid, cash); new string[128]; format(string,sizeof(string),"Congradulations, you just finished the car parts route and received $%d", cash); SendClientMessage(playerid, 0x0090F2FF, string); return 1; } } return 1; }
Код:
if(FEDEXCPT[playerid] == 2) { FEDEXCPT[playerid] = 3; SetPlayerCheckpoint(playerid, -2132.1865, -125.8788, 35.5553, 10); FreezePlayer(playerid, 5); new string[18]; format(string, sizeof(string), "Unloading van"); GameTextForPlayer(playerid, string, 3000, 3); SendClientMessage(playerid, 0x0090F2FF, "Head back to HQ to get your pay!"); return 1; }