TheMaysTRo Posted July 7, 2014 Share Posted July 7, 2014 jobveh = createVehicle (truckModel,car[1],car[2],car[3],0,0,car[4]) idlist = {602,410,545,436,551} vehidd = idlist [math.random(#idlist)] function create ( player,seat,jacked) if (getElementModel (jobveh) == 525) then local x, y, z = unpack ( jobspawn [ math.random ( #jobspawn ) ] ) vehId=math.random(1,6); vehic = createVehicle (vehidd,jobspawn[vehId][1], jobspawn[vehId][2], jobspawn[vehId][3]) setVehicleDamageProof (vehic , true ) setElementHealth (vehic, 495 ) setVehicleEngineState (vehic, false) setVehicleLocked (vehic , true ) vehblip = createBlipAttachedTo (vehic,0,4,255,255,0,255,0,9999.0,player) end end addEventHandler ( "onVehicleEnter", getRootElement(player), create ) the vehic and the vehblip should appear when i enter the tow truck only thats have the id 525 and its appearing on evrey car. whats the soulution ? Link to comment
MIKI785 Posted July 7, 2014 Share Posted July 7, 2014 That makes no sense.. it's done wrong... You check the model of a vehicle that's defined somewhere else and has the correct model, of course it will always pass... use source instead. There are other things done wrong as well.. and does indentation mean anything at all to you? Who's supposed to read that? 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