Wikia

Vim Tips Wiki

Open a web-browser with the URL in the current line

Talk0
1,613pages on
this wiki
Revision as of 05:57, September 7, 2012 by 115.133.68.46 (Talk)

local root = getRootElement()

local this = getThisResource()

local resourceRoot = getResourceRootElement(this)

local localPlayer = getLocalPlayer()

local Marker = {}


--[[

   Events

]]

addEventHandler("onClientResourceStart", resourceRoot,

   function()
       Marker[1] = createMarker(3012.8034667969, -1304.4008789063, 8.7787075042725, "corona", 5, 255, 10, 0)
       Marker[2] = createMarker(3011.4096679688, -1257.5598144531, 95.511764526367, "corona", 5, 255, 10, 0)
   end

)


addEventHandler("onClientMarkerHit", root,

   function(player, matchingDimension)
       if not matchingDimension then return end


       if player == localPlayer and isPedInVehicle(player) then
           local vehicle = getPedOccupiedVehicle(player)


           -- Check markers..
           if source == Marker[1] then
               setVehicleGravity(vehicle, 0, 1, 0)
           elseif source == Marker[2] then
                      setVehicleGravity(vehicle, 0, 0, -1)     
           end
       end
   end

)

Around Wikia's network

Random Wiki