[REQ HELP]Needed help with checkpoints! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [REQ HELP]Needed help with checkpoints! (
/showthread.php?tid=481725)
[REQ HELP]Needed help with checkpoints! -
RevCeo - 17.12.2013
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:
Код:
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;
}
It choose check piont randomly, so here's the checkpoints pick:
Код:
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}
};
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!
Код:
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;
}
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!