17.12.2013, 11:10
Right, im been trying to create job script for while, but i cant, coz im heving troble with checkpoints.
- I've created command that gives you the next checpoint:
It choose check piont randomly, so here's the checkpoints pick:
And here is the checkpoint when you arrive after entering command that gives you checkpionts randomly,
so i want to add more checkpoints like this here, but i dont know how to!
this here is the thing it dose when you arrive, so i want them more, at more location, any info how to do that?
Please help me out!
- I've created command that gives you the next checpoint:
Код:
CMD:ppicu(playerid, params[]) { if(PizzaBoy[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, 2123.4338,-1769.8925,13.5073)) { new rand = random(sizeof(RandomCheckpoint)); SetPlayerCheckpoint(playerid, RandomCheckpoint[rand][0], RandomCheckpoint[rand][1], RandomCheckpoint[rand][2], 5); } else { if (GetPVarType(playerid, "Delivering")) SendClientMessage(playerid, COLOR_WHITE, "---------------------------"); } return 1; }
Код:
new Float:RandomCheckpoint[][4] = { {1772.2240,-2120.3047,12.7619, 10.0}, {1910.1426,-1131.2328,24.1655, 10.0}, {2178.5088,-1660.3746,14.9678, 10.0} };
so i want to add more checkpoints like this here, but i dont know how to!
Код:
public OnPlayerEnterCheckpoint(playerid) { if (IsPlayerInRangeOfPoint(playerid, 5.0, 1772.2240,-2120.3047,12.7619)) //Checkpoint 1 { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_WHITE, "----------------------------------------------!"); SetPlayerCheckpoint(playerid,1782.3171, -2125.9302, 13.2678, 1.0); } else { IsPlayerInRangeOfPoint(playerid, 1.0, 1782.3171,-2125.9302,13.2678); DisablePlayerCheckpoint(playerid); GivePlayerMoney(playerid,2500); GameTextForPlayer(playerid,"Pica piegadata ~y~+2.500$",3000,5); SendClientMessage(playerid, COLOR_WHITE, "---------------------------------------"); SendClientMessage(playerid, COLOR_WHITE, "---------------------------------------"); DeletePVar(playerid, "Delivering"); } return 1; }
Please help me out!