aboodehoms2014 Posted August 26, 2016 Share Posted August 26, 2016 i made script for my shooter server the script is give the killer fix car but i dont know why it didnt work if anyone can help me please client addEventHandler('onClientVehicleDamage',root, function(attacker) if attacker and getElementType(attacker) == 'player' and attacker ~= getVehicleOccupant(source) then triggerServerEvent('shooter:setData',getVehicleOccupant(source),'killer1222',attacker) setTimer(triggerServerEvent,4000,1,'shooter:setData',getVehicleOccupant(source,0),'killer1222',false) end end ) -- addEventHandler('onClientPlayerWasted',root, function(killer) if getElementData(source,'killer1222') ~= false and getElementData(source,'killer1222') ~= source then fixVehicle(killer1222) end end ) server addEvent('shooter:setData',true) addEventHandler('shooter:setData',root, function(dataname,datavalue) setElementData(client,dataname,datavalue) end ) Link to comment
draobrehtom Posted August 26, 2016 Share Posted August 26, 2016 You have a wrong name variable (killer1222) in function fixVehicle and you didnt get vehicle player. Try: fixVehicle(getPedOccupiedVehicle(getElementData(source, 'killer1222'))) 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