28.06.2012, 17:41
(
Last edited by kaiks; 28/06/2012 at 07:04 PM.
)
Okay i have a problem with Checkpoints, the first CP is good, but the second isn't,
it doesn't stop loading the cargo off. Also i have 4 checkpoints more to go, but i haven't finished them,
because the second one doesn't work well.
Heres the /work code, it works fine, but i'm just adding it here for you to see my first CP.
Ok, here's the bad boy.
Oh and i want it to say "The cargo is being loaded on the bus" for the first CP and
"The cargo is being loaded off the bus" for 4 others.
Here are the coordinates for the other 4 Checkpoints:
I don't want you to make it for me, just give me tips how should i make the checkpoint system.
it doesn't stop loading the cargo off. Also i have 4 checkpoints more to go, but i haven't finished them,
because the second one doesn't work well.
Heres the /work code, it works fine, but i'm just adding it here for you to see my first CP.
pawn Code:
if(strcmp(cmdtext, "/tццle", true) == 0)
{
if(gTeam[playerid] != 2) return SendClientMessage(playerid, COLOR_GREY, "Sa ei ole kaubavedaja!");
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 440) return SendClientMessage(playerid, COLOR_GREY, "Sa ei ole kaubavedaja autos!");
if(gTeam[playerid] == 2)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 440)
{
SendClientMessage(playerid, COLOR_GREY, "Alustasid tццd, mine vхta kaup peale.");
SetPlayerCheckpoint(playerid,120.403518, -294.375122, 1.578125, 3.0);
}
return 1;
}
return 1;
}
pawn Code:
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 440)
{
if(gTeam[playerid] == 2) // The carbo is being loaded on the bus or smth like that
GameTextForPlayer(playerid, "Kaupa laetakse peale...", 6950, 3);
TogglePlayerControllable(playerid, 0);
SetTimerEx("UnfreezePlayer", 7000, false, "d", playerid);
SetPlayerCheckpoint(playerid,203.737503, -181.615310, 1.578125,3);
return 1;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 440)
{
if(gTeam[playerid] == 2) // The cargo is being loaded off the bus or smth like that
GameTextForPlayer(playerid, "Kaupa laetakse maha...", 6950, 3);
TogglePlayerControllable(playerid, 0);
SetTimerEx("UnfreezePlayer", 7000, false, "d", playerid);
SetPlayerCheckpoint(playerid,681.379150, -443.011749, 16.335937, 3);
return 1;
}
return 1;
}
"The cargo is being loaded off the bus" for 4 others.
Here are the coordinates for the other 4 Checkpoints:
pawn Code:
SetPlayerCheckpoint(playerid,156.981262, -167.841812, 1.578125, 3);
SetPlayerCheckpoint(playerid,663.840759, -548.668701, 16.335937, 3);
SetPlayerCheckpoint(playerid,714.766601, -569.432983, 16.335937, 3);
SetPlayerCheckpoint(playerid,124.784370, -268.202026, 1.578125, 3); // End