SA-MP Forums Archive
Is it possible to make the scirpt run a command from the game? - 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: Is it possible to make the scirpt run a command from the game? (/showthread.php?tid=65532)



Is it possible to make the scirpt run a command from the game? - LibertyWorld - 13.02.2009

I have the LinkVehicleToInterior thing, but when the vehicles respawn they dont take the right interior.(the vehicles become invisible)

How to fix that?


Re: Problem with Vehicle set to Interiors - [RP]Rav - 13.02.2009

Link it to the interior again @ OnVehicleSpawn(vehicleid) ?


Re: Problem with Vehicle set to Interiors - LibertyWorld - 13.02.2009

Quote:
Originally Posted by Rav
Link it to the interior again @ OnVehicleSpawn(vehicleid) ?
Thanks i will try it

and do you know how to make every vehicle that teleport with me with a command to another interior(make the car interior change also)?


Re: Problem with Vehicles set to Interiors - Nero_3D - 13.02.2009

Just set the interior for the vehicle in the teleport command too


Re: Problem with Vehicles set to Interiors - LibertyWorld - 13.02.2009

How would i do that?

Is there like a SetVehicleInterior?


Re: Problem with Vehicles set to Interiors - Think - 13.02.2009

Quote:
Originally Posted by plɹoʍ ʎʇɹǝqıl
How would i do that?

Is there like a SetVehicleInterior?
https://sampwiki.blast.hk/wiki/LinkVehicleToInterior


Re: Problem with Vehicles set to Interiors - LibertyWorld - 13.02.2009

lol, i know that

i mean do i do it like this

pawn Код:
LinkVehicleToInterior(name,4);



Re: Problem with Vehicles set to Interiors - Daren_Jacobson - 13.02.2009

this is an example of /warp (/goto for you godfatherers(i did this in the reply box, so it might be bad))
pawn Код:
SetPlayerInterior(playerid, GetPlayerInterior(pid))
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pid))
if (IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(pid))
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(pid))
//now the teleport stuff



Re: Problem with Vehicles set to Interiors - LibertyWorld - 13.02.2009

Quote:
Originally Posted by Daren_Jacobson
this is an example of /warp (/goto for you godfatherers(i did this in the reply box, so it might be bad))
pawn Код:
SetPlayerInterior(playerid, GetPlayerInterior(pid))
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pid))
if (IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(pid))
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(pid))
//now the teleport stuff
I didnt need that,

i figured it out


Re: Is it possible to make the scirpt run a command from the game? - LibertyWorld - 13.02.2009

Is it possible to make the scirpt run a command from the game?


Re: Is it possible to make the scirpt run a command from the game? - Nero_3D - 13.02.2009

what you mean exactly ?


Re: Is it possible to make the scirpt run a command from the game? - LibertyWorld - 13.02.2009

Quote:
Originally Posted by ♣ ⓐⓢⓢ
what you mean exactly ?
nvm i fixed what i wanted.