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



If IsPlayerInVehicle - IIKINGII - 19.03.2013

Hi I need help with placing a checkpoint that appears if you in a vehicle ID

If have do this but this is not the good way
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsPlayerInVehicle(playerid, [B]Boot[/B]))
{
SetPlayerCheckpoint(playerid, -2971.8198, 497.0827, 0.1410, 4.0); //FIX
}
return 1;
}



Re: If IsPlayerInVehicle - Misiur - 19.03.2013

What is Boot? Where do you assign to it?


Re: If IsPlayerInVehicle - IIKINGII - 19.03.2013

Boot is the vehicle ID Boot is in Dutch boat


Re: If IsPlayerInVehicle - Misiur - 19.03.2013

Well, in that case your code is valid. In case you want this only for driver, you have to use https://sampwiki.blast.hk/wiki/OnPlayerStateChange


Re: If IsPlayerInVehicle - IIKINGII - 19.03.2013

Solved