Checkpoint problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checkpoint problem (
/showthread.php?tid=234382)
Checkpoint problem -
Sascha - 03.03.2011
Hi...
So all in all it's a kind of mission system
I've placed a pickup.. if you enter it a dialog shows and sets a checkpoint... when you enter the checkpoint it should show the next one... but it doesn't respond at all...
At the Dialog:
pawn Код:
if(listitem == 0)
{
PlayerData[playerid][Mission][0] = listitem;
PlayerData[playerid][Mission][1] = 1;
PlayerData[playerid][Mission][2] = 500;
PlayerData[playerid][Mission][3] = 514;
PlayerData[playerid][Mission][4] = 584;
PlayerData[playerid][Mission][5] = -1;
PlayerData[playerid][Mission][6] = -1;
SetPlayerCheckpoint(playerid, 251.9726,1421.0834,11.1321, 2.00);
}
at "OnPlayerEnterCheckpoint"
pawn Код:
new string[256];
if(PlayerData[playerid][Mission][0] != -1)
{
if(PlayerData[playerid][Mission][0] == 0 || PlayerData[playerid][Mission][0] == 1 || PlayerData[playerid][Mission][0] == 2)
{
if(PlayerData[playerid][Mission][1] == 1)
{
if(!IsPlayerInAnyVehicle(playerid))
{
format(string, sizeof(string), "You need to get a '%s' with a '%s'", VehicleName[PlayerData[playerid][Mission][3]], VehicleName[PlayerData[playerid][Mission][4]]);
SendClientMessage(playerid, GREY, string);
return 1;
}else{
new v, v2, m, m2;
v = GetPlayerVehicleID(playerid);
v2 = GetVehicleTrailer(v);
m = GetVehicleModel(v);
m2 = GetVehicleModel(v2);
if(m != PlayerData[playerid][Mission][3])
{
format(string, sizeof(string), "You need a '%s'", VehicleName[PlayerData[playerid][Mission][3]]);
SendClientMessage(playerid, GREY, string);
return 1;
}
if(m2 != PlayerData[playerid][Mission][4])
{
format(string, sizeof(string), "You need a '%s' trailer", VehicleName[PlayerData[playerid][Mission][4]]);
SendClientMessage(playerid, GREY, string);
return 1;
}
PlayerData[playerid][Mission][5] = v;
PlayerData[playerid][Mission][6] = v2;
PlayerData[playerid][Mission][1] = 2;
TogglePlayerControllable(playerid, 0);
SetTimerEx("MissionLoading", 2000, false, "i", playerid);
}
}else if(PlayerData[playerid][Mission][1] == 2)
{......................
what's wrong?
Re: Checkpoint problem -
Sascha - 03.03.2011
bump
Re: Checkpoint problem -
Jefff - 03.03.2011
https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerRaceCheckpoint
+
everywhere
VehicleName[... - 400]
Re: Checkpoint problem -
Sascha - 04.03.2011
the vehiclename thing is true... but as far as I know there is nothing wrong with my SetPlayerCheckpoint...
I don't need race checkpoints and neither I need to disable the checkpoint...
again:
The checkpoint doesn't response...