Jump to content

Taxi Script [HELP


damien111

Recommended Posts

I am trying to create my taxi script from scratch. I am not sure why it is not workng but it is not creating a marker. Also. any advice will be greatly appreciated. Thanks!

      pickedup = false 
      local id = getElementModel ( vehicle ) 
      
        local VehMarker = createMarker ( 1731.9326171875, 1927.2426757813, 10, "cylinder", 2, 0, 120, 255, 0 ) 
         local theTeam = createTeam ( "Taxi Drivers" ) 
        function startjob ( hitElement, matchingDimension ) 
            local elementType = getElementType ( hitElement ) 
            if ( elementType == "player" ) then 
            setPlayerTeam(source, theTeam) 
            setPlayerSkin(playerSource, 280) 
            
                    local x, y, z = getElementPosition ( hitElement ) 
                    local vehicle = createVehicle ( 597, x, y, z ) 
                    
                    if id == 420 then 
        function f() 
           pickup = createMarker(x, y, z, "cylinder", 2, 250, 250, 250) 
           pickupblip = createBlipAttachedTo(43, pickup) 
           dropoff = createMarker(a, b, c, "cylinder", 2, 250, 250, 250) 
           dropoffblip = createBlipAttachedTo(44, pickup) 
        end 
                    
                    end 
                end 
      
        end 
        addEventHandler ( "onMarkerHit", VehMarker, startjob ) 
      
      function checkifintaxi ( ) 
      
      
      
      
      
      end 
      
      
    --Tabel Of Cooridnates of Pickups 
      
      
      
      
        local pickups = 
        { 
                { 1012.4227905273, 2017.2518319547, 9 }, 
                { 987.3311767582, 2288.8173828125, 9 }, 
                { 1614,3260498047, 2085.966796875, 9 }, 
                { 2099.5419921875, 2026.4774169922, 9 }, 
                { 2362.6103515625, 2005.8046875, 9 }, 
                { 2826.5612792969, 1980.7646484375, 9 }, 
                { 2903.5383300781, 2403.18017527813, 9 }, 
                { 2099.5419921875, 2026.4774169922, 9 } 
        } 
        
        local dropoffs = 
        { 
                { 2290.7290039063, 2417.2971191406, 9 }, 
                { 2211.8864746094, 1839.1610107422, 9 }, 
                { 2155.9345703125, 977.22955322266, 9 }, 
                { 1863.4801025391, 654.181640625, 9 }, 
                { 1688.4946289063, 994.02716064453, 9 }, 
                { 1398.4516601563, 1052.9704589844, 9 }, 
                { 1039.3806152344, 1138.0095214844, 9 }, 
                { 1112.4752197266, 1376.9332275391, 9 } 
        } 
        x, y, z = getRandomCoordinatesDropOff ( ) 
        a, b, c = getRandomCoordinatesPickup ( ) 
        
            function getRandomCoordinatesPickup ( ) 
            return unpack ( pickups [ math.random ( #pickups  ) ] ) 
        end 
            function getRandomCoordinatesDropOff ( ) 
            return unpack ( dropoffs [ math.random ( #dropoffs  ) ] ) 
        end 
        
      
        
        function pickingup ( hitElement, matchingDimension ) 
        local elementType = getElementType ( hitElement ) 
        if ( elementType == "player" ) then 
        if id == 420 then 
        local pickedup = true 
            end 
        end 
        
        function dropoff ( hitElement, matchingDimension ) 
        local elementType = getElementType ( hitElement ) 
        if ( elementType == "player" ) then 
        givePlayerMoney ( source, 1000 ) 
        destroyElement (pickup) 
        destroyElement (dropoff)   
        destroyElement (pickupblip) 
        destroyElement (dropoffblip) 
            function g() 
           pickup = createMarker(x, y, z, "cylinder", 2, 0, 250, 250, 250) 
           pickupblip = createBlipAttachedTo(43, pickup) 
           dropoff = createMarker(a, b, c, "cylinder", 2, 0, 250, 250, 250) 
           dropoffblip = createBlipAttachedTo(44, pickup) 
       end 
        end 
    end 
    end 
    addEventHandler ( "onMarkerHit", pickup, pickingup ) 
    addEventHandler ( "onMarkerHit", dropoff, dropoff ) 

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...