SA-MP Forums Archive
SetPlayerCheckpoint - 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: SetPlayerCheckpoint (/showthread.php?tid=528912)



SetPlayerCheckpoint - babecka - 30.07.2014

PHP код:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    new 
Veh GetPlayerVehicleID(playerid);
    if(
Veh == 448)
    {
         if(
pInfo[playerid][IsPlayerPizzaboy] == true)
           {
            new 
rand random(sizeof(pizzaDelivery));
            
SetPlayerCheckpoint(playeridpizzaDelivery[rand][0], pizzaDelivery[rand][1], pizzaDelivery[rand][2], 3.0);
           }
    }
    return 
1;

This is my code, however, the checkpoint does not appear. No errors, warnings.


Re: SetPlayerCheckpoint - IceBilizard - 30.07.2014

did you make cords of checkpoints?

example
pawn Код:
new Float:pizzaDelivery[][] =
{
    {Here cords}
};



Re: SetPlayerCheckpoint - Clad - 30.07.2014

Are you sure you did enter Pizza Boi Vehicle ?


Re: SetPlayerCheckpoint - ViniBorn - 30.07.2014

Replace
pawn Код:
new Veh = GetPlayerVehicleID(playerid);
pawn Код:
new Veh = GetVehicleModel(GetPlayerVehicleID(playerid));



Re: SetPlayerCheckpoint - Jefff - 30.07.2014

Should be
if( GetVehicleModel( Veh ) == 448 )


Re: SetPlayerCheckpoint - Clad - 30.07.2014

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(GetVehicleModel(vehicleid) == 448)
    {
         if(pInfo[playerid][IsPlayerPizzaboy] == true)
           {
            new rand = random(sizeof(pizzaDelivery));
            SetPlayerCheckpoint(playerid, pizzaDelivery[rand][0], pizzaDelivery[rand][1], pizzaDelivery[rand][2], 3.0);
           }
    }
    return 1;
}
This work fine, I'm pretty sure, You have something wrong with that random coordinates.


Re: SetPlayerCheckpoint - babecka - 30.07.2014

I've tried everything, but nothing works.


Re: SetPlayerCheckpoint - Blademaster680 - 30.07.2014

Make sure your Float: pizzaDelivery is set to 3 values.Could you show use you "new Float: pizzaDelivery" please


Re: SetPlayerCheckpoint - babecka - 31.07.2014

PHP код:
static Float:pizzaDelivery[20][3] =
{
    {-
2378.99781317.874116.0611},
    {-
2354.71021263.686926.2144},
    {-
2371.49291115.632955.7266},
    {-
2458.66061133.675455.7266},
    {-
2577.22491145.591755.7266},
    {-
2599.4448969.217078.2836},
    {-
2570.1301916.184864.9844},
    {-
2431.5283899.600950.3249},
    {-
2376.6199784.353335.1719},
    {-
2322.2085816.235145.1090},
    {-
2550.1704800.897249.9844},
    {-
2576.6282816.757549.9844},
    {-
2614.7183830.746749.9844},
    {-
2659.8044806.175449.9844},
    {-
2684.9578819.259549.9844},
    {-
2743.6890865.453264.7907},
    {-
2744.2253747.009250.2130},
    {-
2841.5918692.136523.0355},
    {-
2861.0640812.641138.8102},
    {-
2846.4707970.307643.6686}
}; 
I've also tried this:

PHP код:
static Float:pizzaDelivery[][] =
{
    {-
2378.99781317.874116.0611},
    {-
2354.71021263.686926.2144},
    {-
2371.49291115.632955.7266},
    {-
2458.66061133.675455.7266},
    {-
2577.22491145.591755.7266},
    {-
2599.4448969.217078.2836},
    {-
2570.1301916.184864.9844},
    {-
2431.5283899.600950.3249},
    {-
2376.6199784.353335.1719},
    {-
2322.2085816.235145.1090},
    {-
2550.1704800.897249.9844},
    {-
2576.6282816.757549.9844},
    {-
2614.7183830.746749.9844},
    {-
2659.8044806.175449.9844},
    {-
2684.9578819.259549.9844},
    {-
2743.6890865.453264.7907},
    {-
2744.2253747.009250.2130},
    {-
2841.5918692.136523.0355},
    {-
2861.0640812.641138.8102},
    {-
2846.4707970.307643.6686}
}; 
It still doesn't work.