Hypnos Posted January 29, 2015 Share Posted January 29, 2015 Hello everybody, I make job system, I have a problem. One of the two players finished the task in other player destroyed the car. I want to not destroyed the other players car. Waiting your help. function HirsizGorevOn1() HirsizGorevMarker = createMarker(1604.5999755859, -1435.0999755859, 12.8, 'cylinder', 2, 76, 224, 30, 255,source) HirsizGorevBlip = createBlip (1604.5999755859, -1435.0999755859, 12.8, 53, 2, 255, 0, 0, 255, 0, 10000,source) addEventHandler ("onMarkerHit", HirsizGorevMarker, HirsizGorevFinish) addEventHandler ("onVehicleExit", getRootElement(), HirsizGorevExit) addEventHandler ("onPlayerQuit", getRootElement(), HirsizGorevQuit) HirsizAraba = createVehicle (482, 1605, -1465.900390625, 13.800000190735, 0, 0, 0) warpPedIntoVehicle ( source, HirsizAraba ) end addEvent("HirsizGorevOn1", true) addEventHandler("HirsizGorevOn1", getRootElement(), HirsizGorevOn1) function HirsizGorevFinish(hitElement) if hitElement == HirsizAraba then destroyElement (HirsizGorevMarker) destroyElement (HirsizGorevBlip) destroyElement (HirsizAraba) end end Link to comment
SkatCh Posted January 30, 2015 Share Posted January 30, 2015 use table like this: HirsizAraba = {} HirsizAraba{client} = createVehicle (482, 1605, -1465.900390625, 13.800000190735, 0, 0, 0) Link to comment
ALw7sH Posted January 31, 2015 Share Posted January 31, 2015 use table like this: HirsizAraba = {} HirsizAraba{client} = createVehicle (482, 1605, -1465.900390625, 13.800000190735, 0, 0, 0) this one HirsizAraba{client} must be like that HirsizAraba[client] --- local HirsizAraba = {} function HirsizGorevOn1() HirsizGorevMarker = createMarker(1604.5999755859, -1435.0999755859, 12.8, 'cylinder', 2, 76, 224, 30, 255,source) HirsizGorevBlip = createBlip (1604.5999755859, -1435.0999755859, 12.8, 53, 2, 255, 0, 0, 255, 0, 10000,source) addEventHandler ("onMarkerHit", HirsizGorevMarker, HirsizGorevFinish) addEventHandler ("onVehicleExit", getRootElement(), HirsizGorevExit) addEventHandler ("onPlayerQuit", getRootElement(), HirsizGorevQuit) HirsizAraba[source] = createVehicle (482, 1605, -1465.900390625, 13.800000190735, 0, 0, 0) warpPedIntoVehicle ( source, HirsizAraba[source] ) end addEvent("HirsizGorevOn1", true) addEventHandler("HirsizGorevOn1", getRootElement(), HirsizGorevOn1) function HirsizGorevFinish(hitElement) if hitElement == HirsizAraba then destroyElement (HirsizGorevMarker) destroyElement (HirsizGorevBlip) local player = getVehicleController(hitElement) destroyElement (HirsizAraba[player]) end end 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