put player in car problem - 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: put player in car problem (
/showthread.php?tid=657496)
put player in car problem -
S3DOx - 08.08.2018
Hello,
I have Been Trying to create a cmd thats create car and after i left car i wan't to go back to the car with out opening the door
Re: put player in car problem -
RogueDrifter - 08.08.2018
https://sampwiki.blast.hk/wiki/PutPlayerInVehicle
Re: put player in car problem -
S3DOx - 09.08.2018
Yeah I Try it but i need to get the id of the vehicle to put me on it right ?
soo how can i get the id of the car without getplayervehicleID ?
Re: put player in car problem -
RogueDrifter - 09.08.2018
PHP код:
new thevehicle;//Where the vehicle id will be stored.
//UNDER SOME CALLBACK
thevehicle = CreateVehicle(422....///ETC);
//UNDER ANOTHER CALLBACK
PutPlayerInVehicle(thevehicle, ...//ETC);
Re: put player in car problem -
taktaz - 09.08.2018
Use this on your command exept CreateVehicle(...
PHP код:
SetPVarInt(playerid,"SpawnedCar",CreateVehicle(411,...));
Then use this when you want to put player in it
PHP код:
PutPlayerInVehicle(playerid,GetPVarInt(playerid,"SpawnedCar"),0);