Vehicle's position - 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's position (
/showthread.php?tid=644359)
Vehicle's position -
Kraeror - 06.11.2017
Hello guys, is it possible to get the vehicle's spawn position, without using the callback OnVehicleSpawn, because this callback doesn't check the vehicle's position when I spawn it in-game?
If there is function for getting vehicle's spawn position, please give me, I realy need this!
Re: Vehicle's position -
StrikerZ - 06.11.2017
Use this on OnVehicleSpawn
https://sampwiki.blast.hk/wiki/GetVehiclePos
Re: Vehicle's position -
Kraeror - 06.11.2017
Quote:
Originally Posted by Sunehildeep
|
Please man first read my post, than reply!
Re: Vehicle's position -
StrikerZ - 06.11.2017
Quote:
Originally Posted by Kraeror
Please man first read my post, than reply!
|
I did what you said, using that callback and function will give you it's spawn position. No callback has the x y z of spawn pos of the car except createvehicle
Re: Vehicle's position -
Kraeror - 06.11.2017
Quote:
Originally Posted by Sunehildeep
I did what you said, using that callback and function will give you it's spawn position. No callback has the x y z of spawn pos of the car except createvehicle
|
Thanks for help, I will try!
Re: Vehicle's position -
Lucases - 06.11.2017
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
// your script
return 1;
}