Checkpoint problem
#1

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?
Reply
#2

bump
Reply
#3

https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerRaceCheckpoint
+
everywhere
VehicleName[... - 400]
Reply
#4

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)