Jokeℝ1472771893 Posted August 9, 2012 Posted August 9, 2012 idk what is wrong here but when i enter 1st marker the second marker placed by not coordinats that i put in script local robberTable = { {662.77813720703,-1466.8835449219,14}; {1081.1281738281,-1697.1042480469,13}; {1889.9724121094,-1102.2674560547,25}; {2502.1149902344, -1348.7891845703,29}; {2267.6799316406,-1670.7275390625,15}; {2322.2175292969,-1796.1129150391,13}; } function unpackRobber () return unpack ( robberTable [ math.random ( #robberTable ) ] ) end function createRoute () if ( source == buttonrob ) then x, y, z = unpackRobber () robbMarker = createMarker ( x, y, z, "cylinder", 1.5, 250, 0, 0, 85 ) addEventHandler("onClientMarkerHit",robbMarker,unctrob) robberBlip = createBlipAttachedTo( robbMarker, 32 ) setElementVisibleTo( robbmarker, getRootElement(), false ) setElementVisibleTo( robberblip, getRootElement(), false ) setElementVisibleTo( robbmarker, source, true ) setElementVisibleTo( robberblip, source, true ) end end addEventHandler ( "onClientGUIClick", root, createRoute ) function unctrob ( hitElement ) if ( not isPedInVehicle ( localPlayer ) and hitElement == localPlayer ) then triggerServerEvent ( "givePayRob", localPlayer ) destroyElement ( robbMarker ) destroyElement ( robberBlip ) createRoute() end end function fun () cancelEvent () end addEventHandler ( "onClientPedDamage", resourceRoot, fun ) EDIT:It's placed by coordinats of another script wich is in that folder
TAPL Posted August 9, 2012 Posted August 9, 2012 This is server side, and your event is client side .. setElementVisibleTo and source in line 24 and 25 is a button
TAPL Posted August 9, 2012 Posted August 9, 2012 lol sorry Client Side* Yeah, and i said that setElementVisibleTo is Server Side function.
albers14 Posted August 10, 2012 Posted August 10, 2012 so how to fix it? You fix it with removing it. If you create the marker clientside then its only the guy that can see it (:
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