-
Posts
85 -
Joined
-
Last visited
Posts posted by Stylez
-
-
Hi guys. i made this script but it has 2 errors in debug.
[2012-03-28 17:52:27] WARNING: automobiliai\automobiliai.lua:20: Bad 'vehicle' pointer @ 'getVehicleOccupant'(1)
[2012-03-28 17:52:27] WARNING: automobiliai\automobiliai.lua:21: Bad 'vehicle' pointer @ 'getVehicleOccupant'(1)
BTW. script works fine
function engine(driver) local vehicleHealth = getElementHealth(source) if vehicleHealth <= 500 then setVehicleEngineState(source, false) getVehicleOccupant(driver) outputChatBox("((Your engine is broken!))", getVehicleOccupant(driver), 255, 204,0) end end addEventHandler("onVehicleEnter", getRootElement(), engine)
-
-
I'm newbie in scripting and sometimes i just need an example of script. which i cant find. So, upload it. Than i can see how to scipt. :]
-
-
-
Hi guys. I need some help with creating invisible road of shade objects. And i found this topic in other forum http://ffsgaming.net/showthread.php?310 ... -for-DD-DM its says to change dimension of shade to 1 and the last post says to change it to 2 . But when i change interiors to 1 or 2 in editor, the object becomes invisible. Then i enter test mode the object is still visible.
-
Yes, because you not use argument in timer.
Also bad idea add event handler in timer
And i not understand why you need timer.
Maybe you need if vehicle explode it destroyed in next seconds?
function fExplode ( ) setTimer( destroyElement, 5000, 1, source ) end addEventHandler( 'onVehicleExplode', root, fExplode )
You mean it?
yes thats what i meant. thankyou. :]
-
thanks, but it works only without timer, when i add timer it says bad argument @ destroyElement
-
Hey everybody. i am newbie in MTA scripting, but i badly wanna learn it and after few weeks of reading wiki. i tried to make my own script.
which will delete the blown cars.
i managed to make it so far (serverSide)
function refresh (theVehicle) local vehicles = getElementsByType("Vehicle") if isVehicleBlown(theVehicle) then destroyElement(vehicles) end end addEventHandler("onVehicleExplode", getRootElement(), refresh) setTimer(refresh, 5000, 0)
but when i run it. it shows errors in debug "Bad argument @ isVehicleBlown"
sry, for my english :]
help :?
in Scripting
Posted
oh, thank-you :] for me the hardest thing in scripting are the arguments