gghvcffcv Posted June 24, 2014 Share Posted June 24, 2014 I have done this script but I don't know how to do to destroy the Marker "HouseRob" later a player is into it 1 Minute local HouseRob = createMarker ( 2024.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) function Destruir(hElement) if getElementType ( HouseRob ) == "marker" then destroyElement (HouseRob) triggerServerEvent ( "Destruyelo", localPlayer) end end addEventHandler ("onClientMarkerHit", HouseRob, Destruir) function Warehouse() Warehouse = createMarker ( 2040.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) end addEventHandler ("onClientElementDestroy", HouseRob, Warehouse) function Money(hElement) givePlayerMoney (hElement, 6000) end addEventHandler ("onClientMarkerHit", Warehouse, Money) Link to comment
AboShanab Posted June 24, 2014 Share Posted June 24, 2014 local HouseRob = createMarker ( 2024.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) function Destruir(hElement) if hElement == localPlayer then destroyElement (source) triggerServerEvent ( "Destruyelo", localPlayer) end end addEventHandler ("onClientMarkerHit", HouseRob, Destruir) function Warehouse() Warehouse = createMarker ( 2040.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) end addEventHandler ("onClientElementDestroy", HouseRob, Warehouse) function Money(hElement) if ( hElement == localPlayer ) then givePlayerMoney (hElement, 6000) end end addEventHandler ("onClientMarkerHit", Warehouse, Money) Link to comment
gghvcffcv Posted June 24, 2014 Author Share Posted June 24, 2014 But I want the marker give the money when the player is in the marker 1 Minute Link to comment
Anubhav Posted June 25, 2014 Share Posted June 25, 2014 local HouseRob = createMarker ( 2024.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) function Destruir(hElement) if hElement == localPlayer then destroyElement (source) triggerServerEvent ( "Destruyelo", localPlayer) end end addEventHandler ("onClientMarkerHit", HouseRob, Destruir) function Warehouse() Warehouse = createMarker ( 2040.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) end addEventHandler ("onClientElementDestroy", HouseRob, Warehouse) function Money(hElement) if ( hElement == localPlayer ) then setTimer(givePlayerMoney,60000,1,hElement, 6000) end end addEventHandler ("onClientMarkerHit", Warehouse, Money) 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