BriGhtx3 Posted October 16, 2011 Posted October 16, 2011 Deliver = createMarker ( -2211.1455078125, 565.84979248047, 49.442939758301, "checkpoint", 7, 0, 125, 0, getRootElement() ) function Deliver_func ( hitElement, dim ) local veh = getPedOccupiedVehicle ( hitElement ) end addEventHandler ( "onMarkerHit", Deliver, Deliver_func ) I don't get it, why is there this error? Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
karlis Posted October 16, 2011 Posted October 16, 2011 vehicle can hit marker aswell. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Castillo Posted October 16, 2011 Posted October 16, 2011 Deliver = createMarker ( -2211.1455078125, 565.84979248047, 49.442939758301, "checkpoint", 7, 0, 125, 0, getRootElement() ) function Deliver_func ( hitElement, dim ) if getElementType(hitElement) == "player" then veh = getPedOccupiedVehicle ( hitElement ) elseif getElementType(hitElement) == "vehicle" then veh = hitElement end end addEventHandler ( "onMarkerHit", Deliver, Deliver_func ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
BriGhtx3 Posted October 16, 2011 Author Posted October 16, 2011 function Deliver_func( hitElementa, dim ) if getElementType(hitElementa) == "vehicle" then local veh = hitElementa local hitElement = getVehicleOccupant(hitElementa) end end Bad vehicle pointer at getVehicleOccupant Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
Castillo Posted October 16, 2011 Posted October 16, 2011 function Deliver_func( hitElementa, dim ) if getElementType(hitElementa) == "vehicle" then local veh = hitElementa local hitElement = getVehicleOccupant(veh) end end San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
BriGhtx3 Posted October 16, 2011 Author Posted October 16, 2011 Still the same, I already tried that Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
Castillo Posted October 16, 2011 Posted October 16, 2011 My first reply didn't work? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
BriGhtx3 Posted October 16, 2011 Author Posted October 16, 2011 It did, but i still need the occupant of the vehicle. Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
Castillo Posted October 16, 2011 Posted October 16, 2011 Well, then you could have used my code... Deliver = createMarker ( -2211.1455078125, 565.84979248047, 49.442939758301, "checkpoint", 7, 0, 125, 0, getRootElement() ) function Deliver_func ( hitElement, dim ) if getElementType(hitElement) == "player" then veh = getPedOccupiedVehicle ( hitElement ) elseif getElementType(hitElement) == "vehicle" then veh = hitElement end local occupant = getVehicleOccupant(veh) end addEventHandler ( "onMarkerHit", Deliver, Deliver_func ) Should work. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
BriGhtx3 Posted October 16, 2011 Author Posted October 16, 2011 It should, but it doesn't Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
karlis Posted October 16, 2011 Posted October 16, 2011 Well, then you could have used my code... Deliver = createMarker ( -2211.1455078125, 565.84979248047, 49.442939758301, "checkpoint", 7, 0, 125, 0, getRootElement() ) function Deliver_func ( hitElement, dim ) if getElementType(hitElement) == "player" then veh = getPedOccupiedVehicle ( hitElement ) elseif getElementType(hitElement) == "vehicle" then veh = hitElement end local occupant = getVehicleOccupant(veh) end addEventHandler ( "onMarkerHit", Deliver, Deliver_func ) Should work. works ofc, but getting ped vehicle to get ped from it is kind of dumb... [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Aibo Posted October 16, 2011 Posted October 16, 2011 just check the goddamn element TYPE before using element type-specific functions. ?
BriGhtx3 Posted October 16, 2011 Author Posted October 16, 2011 in the code of solidsnake you see that the type is checked. Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
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