golanu21 Posted March 3, 2013 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 [Dev]BloWnRPG - We BloW the World [1%]
Wei Posted March 3, 2013 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 Diet with russian vodka, lose 3 days in one week !
golanu21 Posted March 3, 2013 Author Posted March 3, 2013 not work... the marker is created but when i hit it , nothing [Dev]BloWnRPG - We BloW the World [1%]
Wei Posted March 3, 2013 Posted March 3, 2013 not work... the marker is created but when i hit it , nothing Try again i've fix it Diet with russian vodka, lose 3 days in one week !
golanu21 Posted March 3, 2013 Author 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 [Dev]BloWnRPG - We BloW the World [1%]
golanu21 Posted March 3, 2013 Author Posted March 3, 2013 when is need to put : server side or client side ? [Dev]BloWnRPG - We BloW the World [1%]
Wei Posted March 3, 2013 Posted March 3, 2013 when is need to put : server side or client side ? Server. It works for me Diet with russian vodka, lose 3 days in one week !
golanu21 Posted March 3, 2013 Author 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' [Dev]BloWnRPG - We BloW the World [1%]
Wei Posted March 3, 2013 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 Diet with russian vodka, lose 3 days in one week !
X-SHADOW Posted March 3, 2013 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 ) My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
PaiN^ Posted March 3, 2013 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 ) " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
PaiN^ Posted March 3, 2013 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 ... " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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