SA-MP Forums Archive
AddStaticVehicle 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: AddStaticVehicle Problem (/showthread.php?tid=424815)



AddStaticVehicle Problem - TheStoNe - 23.03.2013

Hi!
I'm working at a filterscript - car ownership, and I'm confrunting with a big problem.
My algorithm for create a vehicle is:


- The player are introducing the values in some dialogs ( like modelid, colors )
- After that, I extract this values from database ( cache r7 ), and with that, I create by AddStaticVehicle, a vehicle. But, here is the problem .. the vehicle doesn't appear . I don't know the source of this problem and I asked you, probably you're knowing. The log of mysql is 'successful'.

Thanks.


Re: AddStaticVehicle Problem - dusk - 23.03.2013

I think AddStaticVehicle I used only OnFilterScriptInit.

Use CreateVehicle


Re: AddStaticVehicle Problem - P3DRO - 23.03.2013

OnFilterScriptInit and or OnGameModeInit


Re: AddStaticVehicle Problem - JhnzRep - 23.03.2013

pawn Код:
CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay)
Is used to create vehicles after the gamemode/filterscript has been initiated.

https://sampwiki.blast.hk/wiki/CreateVehicle


Re: AddStaticVehicle Problem - TheStoNe - 24.03.2013

Ok, so AddStaticVehicle is only for OnGame/FilterscriptInit, and CreateVehicle is for any part of the script?


Re: AddStaticVehicle Problem - vitorvlv - 24.03.2013

AddStaticVehicle = This function can only create vehicles in the OnGameModeInit and the OnFilterScriptInit callback.
CreateVehicle = Creates a vehicle in the world.

https://sampwiki.blast.hk/wiki/AddStaticVehicle
https://sampwiki.blast.hk/wiki/CreateVehicle