golanu21 Posted March 3, 2013 Share Posted March 3, 2013 local x, y, z = 1361.099609375, -1658.7998046875, 12.39999961853 fixmark = createMarker ( x, y, z, "cylinder", 3, 0, 255, 0, 255 ) function fixveh ( thePlayer ) local theVehicle = getPedOccupiedVehicle (thePlayer) money = getPlayerMoney ( thePlayer ) if (money) > 4999 then fixVehicle ( theVehicle ) takePlayerMoney ( thePlayer, 5000 ) end end addEventHandler ( "onMarkerHit", fixmark, fixveh ) not work. no errors .. nothing Link to comment
Wei Posted March 3, 2013 Share Posted March 3, 2013 (edited) local x, y, z = 1361.099609375, -1658.7998046875, 12.39999961853 fixmark = createMarker ( x, y, z, "cylinder", 3, 0, 255, 0, 255 ) function fixveh ( hitElement) if getElementType(hitElement) == "vehicle" then local thePlayer= getVehicleOccupant(hitElement) local money = getPlayerMoney ( thePlayer ) if (money) >= 5000 then fixVehicle ( hitElement) takePlayerMoney ( thePlayer, 5000 ) end end end addEventHandler ( "onMarkerHit", fixmark, fixveh ) Edited March 3, 2013 by Guest Link to comment
golanu21 Posted March 3, 2013 Author Share Posted March 3, 2013 not work... the marker is created but when i hit it , nothing Link to comment
Wei Posted March 3, 2013 Share Posted March 3, 2013 not work... the marker is created but when i hit it , nothing Try again i've fix it Link to comment
golanu21 Posted March 3, 2013 Author Share Posted March 3, 2013 not work... the marker is created but when i hit it , nothing Try again i've fix it no, is not working Link to comment
golanu21 Posted March 3, 2013 Author Share Posted March 3, 2013 when is need to put : server side or client side ? Link to comment
Wei Posted March 3, 2013 Share Posted March 3, 2013 when is need to put : server side or client side ? Server. It works for me Link to comment
golanu21 Posted March 3, 2013 Author Share Posted March 3, 2013 wtf .. i pput it in server side, but his took my money and then give me this error [13:27:05] WARNING: Gamemode\fixveh.lua:9: Bad argument @ 'fixVehicle' Link to comment
Wei Posted March 3, 2013 Share Posted March 3, 2013 wtf .. i pput it in server side, but his took my money and then give me this error[13:27:05] WARNING: Gamemode\fixveh.lua:9: Bad argument @ 'fixVehicle' Copy the code again Link to comment
X-SHADOW Posted March 3, 2013 Share Posted March 3, 2013 local x, y, z = 1361.099609375, -1658.7998046875, 12.39999961853 fixmark = createMarker ( x, y, z, "cylinder", 3, 0, 255, 0, 255 ) addEventHandler ( 'onMarkerHit', fixmark, function ( hitElement ) if (getElementType( hitElement ) == 'player' ) and getPedOccupiedVehicle( hitElement ) and getPlayerMoney( hitElement >=5000) then takePlayerMoney( hitElement, 5000) fixVehicle(getPedOccupiedVehicle(hitElement)) outputChatBox('** Vehicle Fixed **', hitElement, 255, 255, 0) end end ) Link to comment
PaiN^ Posted March 3, 2013 Share Posted March 3, 2013 blazy Code should work. +1 But, If it wasn't working with you, Try this : local x, y, z = 1361.099609375, -1658.7998046875, 12.39999961853 fixmark = createMarker ( x, y, z, "cylinder", 3, 0, 255, 0, 255 ) function fixveh ( hitElement) if getElementType(hitElement) == "vehicle" then local thePlayer= getVehicleOccupant(hitElement) local money = getPlayerMoney ( thePlayer ) if (money) >= 5000 then setElementHealth ( hitElement, 1000 ) takePlayerMoney ( thePlayer, 5000 ) end end end addEventHandler ( "onMarkerHit", fixmark, fixveh ) Link to comment
PaiN^ Posted March 3, 2013 Share Posted March 3, 2013 fixVehicle Works Good !! I know that, But it's not working for him for some reason ! So i thought it may work that way ... Link to comment
iPrestege Posted March 3, 2013 Share Posted March 3, 2013 No Should Work And You To . 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