Teleport Vehicle. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Teleport Vehicle. (
/showthread.php?tid=114296)
Teleport Vehicle. -
arachimi - 18.12.2009
I want to create vehicle from LS. When I enter it. It will teleport me to some interior and teleport me to LV in the next time.
Can you help me?
Thank you, regard.
Tho!
Re: Teleport Vehicle. -
patchkinson - 18.12.2009
under your defines do
new lsveh
underongamemodeinit
lsveh = AddStaticVehicle(...)
and onplayerentervehicle ifisplayerinvehicle lsveh setvehiclepos... dont coy paste that im not in my comp to check the callbacks n stuff. but its somethin like that
Re: Teleport Vehicle. -
Jeffry - 18.12.2009
Well, i think i can make that. But tomorrow, cause im off now.
To get sure:
1st.) Car in LS
2nd.) Entering it
3rd.) Teleport to LV (with car??)
4th.) Car will respawn.
5th.) same as 1st.
Like this?
-Jeffry
Re: Teleport Vehicle. -
arachimi - 18.12.2009
1st.) Car in LS
2nd.) Entering it
3rd.)Teleport to any interior(example House)
4rd.) Teleport from house to LV (not with car)
5th.) same as 1st.
Re: Teleport Vehicle. -
RyDeR` - 18.12.2009
At the top
OnGameModeInit
Код:
Vehicle[0] = AddStaticVehicle(..);
OnPlayerEnterVehicle
Код:
if(vehicleid == Vehicle[0]) SetPlayerPos(x,y,z);
Re: Teleport Vehicle. -
patchkinson - 18.12.2009
Quote:
Originally Posted by » RэРиR «
At the top
OnGameModeInit
Код:
Vehicle[0] = AddStaticVehicle(..);
OnPlayerEnterVehicle
Код:
if(vehicleid == Vehicle[0]) SetPlayerPos(x,y,z);
|
Thats what i wanted to do but im not on a comp with PAWNO"!!
Good job ryder
Re: Teleport Vehicle. -
Jeffry - 18.12.2009
So i dont need to make the script?
Well, if so, nice that you found a solution.
Re: Teleport Vehicle. -
Calon - 18.12.2009
Quote:
Originally Posted by » RэРиR «
At the top
OnGameModeInit
Код:
Vehicle[0] = AddStaticVehicle(..);
OnPlayerEnterVehicle
Код:
if(vehicleid == Vehicle[0]) SetPlayerPos(x,y,z);
|
No offense, but that's a kinda bad idea. Use just "new intname;" not new "intname[1];".
Re: Teleport Vehicle. -
LarzI - 18.12.2009
Quote:
Originally Posted by Calon
Quote:
Originally Posted by » RэРиR «
At the top
OnGameModeInit
Код:
Vehicle[0] = AddStaticVehicle(..);
OnPlayerEnterVehicle
Код:
if(vehicleid == Vehicle[0]) SetPlayerPos(x,y,z);
|
No offense, but that's a kinda bad idea. Use just "new intname;" not new "intname[1];".
|
Depends if he wants to add more vehicles later, then an array variable is pretty useful.
Re: Teleport Vehicle. -
Calon - 19.12.2009
Quote:
Originally Posted by lrZ^ aka LarzI
Quote:
Originally Posted by Calon
Quote:
Originally Posted by » RэРиR «
At the top
OnGameModeInit
Код:
Vehicle[0] = AddStaticVehicle(..);
OnPlayerEnterVehicle
Код:
if(vehicleid == Vehicle[0]) SetPlayerPos(x,y,z);
|
No offense, but that's a kinda bad idea. Use just "new intname;" not new "intname[1];".
|
Depends if he wants to add more vehicles later, then an array variable is pretty useful.
|
True, but he just wants one.