Vanlot Posted January 27, 2013 Share Posted January 27, 2013 belehi dima tgoli expected element at argument 1(destroyElement)w sa3at el debug mayektebli chay .wa9t el car tmes myMarker lezem el car tetfsa5. Thanks ServerSide: local myMarker = createMarker(x,y,z,type,size,r,g,b) function createCar() local car = createVehicle(ID,x,y,z) addEventHandler("onMarkerHit",myMarker,lol) end addEvent("someEvent",true) addEvent("someEvent",root,createCar) function lol(hitElement) if (getElementModel(hitElement) == 522) then destroyElement(car) end end Link to comment
Baseplate Posted January 28, 2013 Share Posted January 28, 2013 local myMarker = createMarker(x,y,z,type,size,r,g,b) function createCar() car = createVehicle(ID,x,y,z) addEventHandler("onMarkerHit",myMarker,lol) end addEvent("someEvent",true) addEvent("someEvent",root,createCar) function lol(hitElement) if (getElementModel(hitElement) == 522) then destroyElement(car) end end matesta3melech local variable fi functions o5ra. Link to comment
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