Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/10/20 in all areas

  1. local pumps = { -- SF GAS STATION NEAR SFPDZ {-1672.05, 405.35, 6.85, true }, {-1666.75, 410.37, 6.85 }, {-1679.24, 412.21, 6.85 }, {-1673.81, 417.5, 6.85 }, -- SF Juniper Hallow place.Near Jizzys club>Pay N spray Gas station {-2407.49, 971.53, 44.97, true }, {-2407.56, 982.32, 44.97 }, {-2414.68, 980.48, 44.97 }, {-2414.68, 970.04, 44.97 }, -- Angel Pine GAS STATION {-2249.57, -2558.71, 31.58, true }, {-2239.06, -2563.1, 31.6 }, {-2244.82, -2561.4, 31.6 }, -- FLINT COUNTRY TRUCKER JOB GAS STATION {-95, -1161.41, 1.91, true }, {-99.95, -1173.21, 2.12 }, {-88.1, -1164.68, 1.96 }, {-92.88, -1176.37, 1.88 }, -- MONTGOMERY {1378.92, 458.36, 19.61, true }, {1383.41, 456.51, 19.61 }, {1385.15, 461.04, 19.8 }, {1380.73, 463.16, 19.8 }, -- LS DILIMORE PD GAS STATION {652.66, -560.14, 16.01, true }, {652.74, -570.98, 16.01 }, {658.22, -569.71, 16.01 }, {658.27, -558.89, 16.01 }, -- LV NEAR BASEBALL STADIUM GAS STATION {1590.09, 2190.96, 10.82, true }, {1601.8, 2190.69, 10.82 }, {1590.38, 2196.61, 10.82 }, {1601.84, 2196.18, 10.82 }, {1602.17, 2202.28, 10.82 }, {1590.28, 2201.79, 10.82 }, {1596, 2206.69, 10.82 }, -- NORTH OF LV NEAR BURGER SHOT GAS STATION {2141.41, 2756.27, 10.82, true }, {2153.37, 2756.49, 10.82 }, {2153.23, 2750.65, 10.82 }, {2141.55, 2750.51, 10.82 }, {2147.46, 2740.06, 10.82 }, -- NORTH OF LV NEAR LVPD GAS STATION {2194.45, 2470.04, 10.82, true }, {2194.61, 2480.42, 10.82 }, {2205.36, 2480.33, 10.82 }, {2205.01, 2469.95, 10.82 }, -- LV NEAR MF BASE GUNSHOP STOP/CARSHOP GAS STATIONS {622.3, 1679.94, 6.99, true }, {618.93, 1684.98, 6.99 }, {615.32, 1689.81, 6.99 }, {612.02, 1694.95, 6.99 }, {608.64, 1699.88, 6.99 }, {605.27, 1704.75, 6.99 }, -- SOUTH OF LV,GUNSHOP GAS STATION {2120.77, 928.59, 10.82, true }, {2108.88, 928.72, 10.82 }, {2120.69, 917.61, 10.82 }, {2109.05, 917.79, 10.82 }, -- SOUTH EAST OF LV GAS STATION COME A LOT NEAR THE PYRAMID {2634.68, 1097.78, 10.82, true }, {2645.61, 1097.5, 10.82 }, {2645.34, 1109.25, 10.82 }, {2634.64, 1109.06, 10.82 }, -- MF BASE {283.12, 2000.55, 17.64 }, {282.15, 2033.92, 17.64 }, -- FORT CARSON NEAR CLUCKIN BELL {64.56, 1219.51, 18.82, true }, {70.53, 1218.7, 18.81 }, {76.42, 1217.21, 18.82 }, -- EL QUEBRADOS GAS STATION {-1328.92, 2672.1, 50.06, true }, {-1327.91, 2677.47, 50.06 }, {-1327.51, 2682.94, 50.06 }, -- LV DESERT-Tiera Robbada near Cluckin bell {-1477.61, 1857.44, 32.63, true }, {-1464.91, 1857.88, 32.63 }, {-1465.24, 1865.8, 32.63 }, {-1477.75, 1865.01, 32.63 }, -- LS GAS STATION NEAR EX.DOD BASE {999.97, -940, 42.17, true }, {1007.03, -939.19, 42.17 }, {1007.75, -933.45, 42.17 }, {1000.55, -934.48, 42.17 }, -- LS GAS STATION "Little Mexico" {1944.29, -1776.53, 13.39, true }, {1944.3, -1769.2, 13.39 }, {1938.93, -1769.1, 13.38 }, {1938.91, -1776.63, 13.39 }, -- Tiera Robbada Gas Station-Trucker stop. {-742.21, 2751.14, 47.22, true }, -- Whetstone-24/7 shop near Angel Pine Gas station {-1602.46, -2709.84, 48.53, true }, {-1605.85, -2714.2, 48.53 }, {-1609.22, -2718.53, 48.53 }, -- LS airport {1943.16, -2643.56, 13.54, true }, {1973.68, -2642.29, 13.54 }, {2006.33, -2641.51, 13.54 }, {2042.73, -2640.8, 13.54 }, -- LV airport {11332.48, 1571.46, 10.82, true }, {11332.54, 1609.93, 10.82 }, -- SF airport {-1308.82, 25.31, 14.14, true }, {-1292.43, 8.07, 14.14 }, {-1275.06, -9.45, 14.14 }, -- Others {1326.45, 1391.54, 10.47, true }, { 1910.71, -2335.42, 13.25, true }, {-2175.83, 2427.19, 0.75, true }, { 2372.07, 505.63, 0.47, true }, {2285.01, -2501.6, 0.61, true }, {-11.01, -1656.07, 0.53, true }, {-5061, 94, 12, true }, {-5061, 100, 12, true }, {-1713, -462, 14, true }, {-1705, -462, 14, true }, } -- Create the markers and blips addEventHandler ( "onClientResourceStart", resourceRoot, function () --for ind,tbl in ipairs(pumps) do for i=1,#pumps do local x, y, z = pumps[i][1], pumps[i][2], pumps[i][3] local theMarker = createMarker ( x, y, z -1, "cylinder", 3.0, 135, 132, 134, 70 ) setElementData(theMarker,"ind",pumps[i][4]) table.insert ( pumps, theMarker ) addEventHandler ( "onClientMarkerHit", theMarker, onFuelPumpMarkerHit, false ) addEventHandler ( "onClientMarkerLeave", theMarker, onFuelPumpMarkerLeave, false ) --end end end )
    1 point
  2. Movido para Programação em Lua.
    1 point
  3. --# server-side : https://wiki.multitheftauto.com/wiki/SetControlState addCommandHandler("teste1", function ( player ) if getPedOccupiedVehicle ( player ) then setControlState( player, "enter_exit", true ) end end) --/ou --# client-side : https://wiki.multitheftauto.com/wiki/SetPedControlState addCommandHandler("teste2", function ( ) if getPedOccupiedVehicle ( localPlayer ) then setPedControlState ( localPlayer, "enter_exit", true ) end end)
    1 point
  4. Hello Guys it's me again, As the tittle says today i'm going to explain to you LUA Strings try to follow me till the end. Let's get started , String is a sequence of characters it can be initialized with three forms which includes: Characters between single 'quotes' : Example 'This is The First Text' Characters between double "quotes" : Example "This is The Second Text" Characters between double [[square brackets]] : Example [[This is The Third Text]] An other example for the above three forms are shown below. Text = {} Text[1] = 'MTA SA' -- Single quotes Text[2] = "The Greatest Game" -- Double quotes Text[3] = [[You Will Ever Play]] -- Double square brackets for i=1,#Text do outputChatBox(Text[i]) end --[[Result : MTA SA The Greatest Game You Will Ever Play]] Escape sequence characters are used in string to change the normal interpretation of character. for more information check the list below: Finding Reversing: Formatting strings: Character and byte: Last function: A character class is used to represent a set of characters. examples shown below. If you have any questions, please feel free to ask.
    1 point
  5. Greetings Community. Today, i'v decided to make a tutorial about LUA tables. In this tutorial, you'll find the whole information about it. it's easy just try to follow my tutorial step by step. Tables are the only data structure available in Lua that helps us create different types like arrays and dictionaries. Lua uses associative arrays and which can be indexed with not only numbers but also with strings of corse except nil. Note: "Tables have no fixed size it can contain billions of rows "based on our need." Lua uses a constructor expression "{}" to create an empty table. An example is shown below mtaTable = {} -- simple table empty mtaTable[1]= "MTA:SA" --simple table value assignment There are in built functions for table manipulation. 1) table.concat (table [, sep [, i [, j]]]) : Concatenates the strings in the tables based on the parameters given. local MTA = {"1","2","3","4","5","6"} -- simple table contain numbers. outputChatBox(table.concat(MTA)) -- concatenated string of table. === > [[output : 123456]] local MTA = {"1","2","3","4","5","6"} -- simple table contain numbers. outputChatBox(table.concat(MTA,", ")) -- concatenate with a character. === > [[output : 1,2,3,4,5,6]] local MTA = {"1","2","3","4","5","6"} -- simple table contain numbers. outputChatBox(table.concat(MTA,", ", 2,3)) -- concatenate MTA (table) based on index. === > [[output : 2,3]] 2) table.insert (table, [pos,] value): Inserts a value into the table at specified position. -- Example 1: local MTA = {"Yellow","Blue","Red"} -- same table but this time contain some colors. table.insert(MTA,"Green") -- insert an other name at the end of the table. -- Result : MTA = {"Yellow","Blue","Red","Green"} outputChatBox("Last color added "..MTA[4]) -- Green -- Example 2: table.insert(MTA,2,"Black") -- insert new color at index 2 outputChatBox("Color at index 2 is "..MTA[2]) -- Black 3) table.remove (table [, pos]) : Removes the value from the table. table.remove(MTA) outputChatBox("The previous last element is "..MTA[5]) -- nil 4) table.sort (table [, comp]) : Sorts the table based on optional comparator argument. Sorting table is often required and the sort functions sort the elements in the table alphabetically. A sample for this shown below. local MTA = {"Yellow","Blue","Red","Green"} for k,v in ipairs(MTA) do outputChatBox("Index: "..k..", Value:"..v) end --[[ Result Index: 1, Value: Yellow Index: 2, Value: Blue Index: 3, Value: Red Index: 4, Value: Green]]-- table.sort(MTA) -- using table.sort for k,v in ipairs(MTA) do outputChatBox("Index: "..k..", Value:"..v) end --[[ Result Index: 1, Value: Blue Index: 2, Value: Green Index: 3, Value: Red Index: 4, Value: Yellow]]--
    1 point
×
×
  • Create New...