Jump to content

random markers function urgent


Deepu

Recommended Posts

function takeJob () 
   if source == taker then 
   destroyElement(pilot) 
   noMarker = createMarker(1953.6999511719, -2178.3000488281, 13.5, "cylinder", 3, 170, 240, 10, 0) 
   triggerServerEvent("onTakka", thePlayer, "yo") 
   requestNewMarkers() 
   guiSetVisible(jobWindow, false) 
   showCursor(false) 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), takeJob) 
  
function cancelJob () 
   if source == canceler then 
   guiSetVisible(jobWindow, false) 
   showCursor(false) 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), cancelJob) 
  
function requestNewMarkers () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
    local ran = math.random(#poopMarkers, 4) 
   reach = createMarker(poopMarkers[ran][1], poopMarkers[ran][2], poopMarkers[ran][3], "cylinder", 3, 241, 227, 13) 
   guiSetVisible(jobWindow, false) 
   createBlipAttachedTo(reach, 51) 
end 
  
function otherMarker () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
    local ran = math.random(#poopMarkers, 4) 
   screach = createMarker(poopMarkers[ran][1], poopMarkers[ran][2], poopMarkers[ran][3], "cylinder", 3, 241, 227, 13) 
   guiSetVisible(jobWindow, false) 
   createBlipAttachedTo(screach, 51) 
end 
  
  
function LS (hitElement) 
   if source == reach then 
      if hitElement == thePlayer then 
      triggerServerEvent("onChakka", thePlayer, "yokohama") 
      otherMarker() 
      end 
   end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), LS) 

the thing is, the function of the random markers doesnt work

look

if I hit reach then screach wont be created where screach will be different markers

Link to comment
  
function takeJob () 
   if source == taker then 
   destroyElement(pilot) 
   noMarker = createMarker(1953.6999511719, -2178.3000488281, 13.5, "cylinder", 3, 170, 240, 10, 0) 
   triggerServerEvent("onTakka", thePlayer, "yo") 
   requestNewMarkers() 
   guiSetVisible(jobWindow, false) 
   showCursor(false) 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), takeJob) 
  
function cancelJob () 
   if source == canceler then 
   guiSetVisible(jobWindow, false) 
   showCursor(false) 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), cancelJob) 
  
function requestNewMarkers () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
   local x,y,z = unpack(poopMarkers[math.random(#poopMarkers)]) 
   createMarker(x,y,z) 
   guiSetVisible(jobWindow, false) 
   createBlipAttachedTo(reach, 51) 
end 
  
function otherMarker () 
   local poopMarkers1 = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
   local x,y,z = unpack(poopMarkers1[math.random(#poopMarkers1)]) 
   guiSetVisible(jobWindow, false) 
   createBlipAttachedTo(screach, 51) 
end 
  
  
function LS (hitElement) 
   if source == reach then 
      if hitElement == thePlayer then 
      triggerServerEvent("onChakka", thePlayer, "yokohama") 
      otherMarker() 
      end 
   end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), LS) 
  

Link to comment
function takeJob () 
   if source == taker then 
   destroyElement(pilot) 
   noMarker = createMarker(1953.6999511719, -2178.3000488281, 13.5, "cylinder", 3, 170, 240, 10, 0) 
   triggerServerEvent("onTakka", thePlayer, "yo") 
   requestNewMarkers() 
   guiSetVisible(jobWindow, false) 
   showCursor(false) 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), takeJob) 
  
function cancelJob () 
   if source == canceler then 
   guiSetVisible(jobWindow, false) 
   showCursor(false) 
   end 
end 
addEventHandler("onClientGUIClick", getRootElement(), cancelJob) 
  
function requestNewMarkers () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
    local ran = math.random(#poopMarkers, 4) 
   reach = createMarker(poopMarkers[ran][1], poopMarkers[ran][2], poopMarkers[ran][3], "cylinder", 3, 241, 227, 13) 
   guiSetVisible(jobWindow, false) 
   createBlipAttachedTo(reach, 51) 
end 
  
function otherMarker () 
   local poopMarkers = { 
      {1816.8000488281, -2517.1000976563, 12.60000038147}, 
      {-1348.6999511719, -235, 13.199999809265}, 
      {416.20001220703, 2503.8000488281, 15.5}, 
      {1572.0999755859, 1472.1999511719, 10.800000190735}, 
   } 
    local ran = math.random(#poopMarkers, 4) 
   screach = createMarker(poopMarkers[ran][1], poopMarkers[ran][2], poopMarkers[ran][3], "cylinder", 3, 241, 227, 13) 
   guiSetVisible(jobWindow, false) 
   createBlipAttachedTo(screach, 51) 
end 
  
  
function LS (hitElement) 
   if source == reach then 
      if hitElement == thePlayer then 
      triggerServerEvent("onChakka", thePlayer, "yokohama") 
      otherMarker() 
      end 
   end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), LS) 

the thing is, the function of the random markers doesnt work

look

if I hit reach then screach wont be created where screach will be different markers

And you are supposed to be a scripter?

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...