SA-MP Forums Archive
Vehicle and checkpoint - 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: Vehicle and checkpoint (/showthread.php?tid=453041)



Vehicle and checkpoint - yancarlos4500 - 23.07.2013

So i have this script that when a player enter a trashmaster and their job is garbage men + if the person has the skin = 16 then it will appear a checkpoint

pawn Код:
else if(IsABasureroVehicles(vehicleid))
        {
            if(Info[playerid][pJob] == 7 || Info[playerid][pJob2] == 7)
                {
                    if(IsABasureroVehicles(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                        {
                            new playerskin = GetPlayerSkin(playerid);
                            if(playerskin == 16)
                            {
                                Basurero[playerid] = 1; // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
                                SetPlayerCheckpoint(playerid, -173.5974,-1612.5616,4.2428, 3.0); // This creates a checkpoint at the coцrdinates: "-269.1287,2610.6057,63.2069"
                                SendClientMessage(playerid, 0xFFFFFFFF, "Ve al checkpoint para comenzar a trabajar");
                            }
                            else
                            {
                                SendClientMessage(playerid, 0xFFFFFFFF, "necesitas la ropa de basurero");
                                return 1;
                            }
                        }
                }
                else
                {
                    RemovePlayerFromVehicle(playerid);
                    new Float:slx, Float:sly, Float:slz;
                    GetPlayerPos(playerid, slx, sly, slz);
                    SetPlayerPos(playerid, slx, sly, slz);
                    NOPCheck(playerid);
                    SendClientMessageEx(playerid, COLOR_GRAD2, "No eres Camionero!");
                    return 1;
                }
        }
There is no error but the checkpoint doesn't appear althought i have all the requirements