yMassai Posted December 31, 2012 Posted December 31, 2012 can anyone help me? i want that when my vehicle hit on the water within a minute he appears in the parking lot. the parking i will determine the coordinates x, y, z. Community Profile MTA:SA = Click Here
Anderl Posted December 31, 2012 Posted December 31, 2012 isElementInWater setTimer setElementPosition "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
yMassai Posted January 2, 2013 Author Posted January 2, 2013 function resurgeveiculo () if isElementInWater(vehicletrafic[source]) then setTimer( setElementPosition ( vehicletrafic[source] , 1650.54077, -1626.85131, 24.89843 ) , 10000, 1, source, true,1 ) end end addEventHandler("onClientResourceStart", root, resurgeveiculo) Community Profile MTA:SA = Click Here
Blaawee Posted January 2, 2013 Posted January 2, 2013 read the 'setTimer' arguments https://wiki.multitheftauto.com/wiki/SetTimer i think it should be like this : function resurgeveiculo () if isElementInWater(vehicletrafic[source]) then setTimer( setElementPosition, 10000, 1, vehicletrafic[source] , 1650.54077, -1626.85131, 24.89843 ) end end addEventHandler("onClientResourceStart", root, resurgeveiculo)
Baseplate Posted January 2, 2013 Posted January 2, 2013 addEventHandler("onClientResourceStart", resourceRoot, resurgeveiculo)
abu5lf Posted January 2, 2013 Posted January 2, 2013 setTimer( function( ) for _, aVehicle in next, getElementsByType 'vehicle' do if isElementInWater( aVehicle ) then setElementPosition( aVehicle, 1650.54077, -1626.85131, 24.89843 ) end end end, 5000, 0 ) ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
TAPL Posted January 2, 2013 Posted January 2, 2013 Well, what about if you have like 20 vehicles, all of them will be in same coordinates?
DNL291 Posted January 3, 2013 Posted January 3, 2013 function resurgeveiculo () if isElementInWater(vehicletrafic[source]) then setTimer( setElementPosition, 1000, 1, vehicletrafic[source], 1650.54077, -1626.85131, 24.89843 ) end end setTimer( resurgeveiculo, 400, 0 ) Please do not PM me with scripting related question nor support, use the forums instead.
yMassai Posted January 3, 2013 Author Posted January 3, 2013 to DNL bad argument @ 'isElementInWater' [expected element at argument 1, got nil] tapl, the intention is to only remove the water vehicle Community Profile MTA:SA = Click Here
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now