itHyperoX
Members-
Posts
522 -
Joined
-
Last visited
-
Days Won
1
Everything posted by itHyperoX
-
So i just realised i dont need this. But thanks anyone!
-
Srry for double reply. On client side working perfect, but i want this to server side.
-
yes, the animation not working.
-
Hello guys,whats the problem? There is no debug error. local randomAnim = { "bd_clap", "bd_clap1", "dance_loop", "dan_down_a", "dan_left_a", "dan_loop_a", "dan_right_a", "dan_up_a", "dnce_m_a", "dnce_m_b", "dnce_m_c", "dnce_m_d", "dnce_m_e", } local ped = createPed(47,2083.7927246094, 1449.6617431641, 10.8203125) setElementData(ped,"ped:Id",1) setPedAnimation(ped,"DANCING",randomAnim[math.random(#randomAnim)]) setElementFrozen(ped,true)
-
i want to make it like this function hoursToDays(hours) local totalHours = tonumber(hours) if totalHours then local hours = math.floor(totalHours/60) local hours = totalHours - hours*60 if hours and hours then return hours,hours else return 0,0 end end end
-
The problem is with the math i think, cuz no debugerror
-
Hi, whats the problem? function hoursToDays(hours) local totalHours = tonumber(hours) if totalHours then local hours = math.floor(totalHours/60) local hours = totalHours - hours*60 if hours and hours then return hours,hours else return 0,0 end end end
-
Hello guys. How can i make a command which is show to the players how long is the server run in second, minutes,hours,days.. something like this: outputChatBox("The Server running "..day.." day, that "..hours.." hours, which is "..minutes.." minutes, and "..second.." ") Thanks any help. Need this for a bigger script, not for this simple, this is just explain
-
Thank you very much. Its working, i get some debug, but i can fix that. Only problem is, when i rob 1 marker, after the timer its not "respawning". Only the second marker respawning also, there is an error: bad argumet @ 'isElementWithinMarker' [Expected marker at argument 2]
-
So, i think i should use tables for positions(?) something like this: Table = { posX, posY,posZ,interiorId,Dimension posX, posY,posZ,interiorId,Dimension posX, posY,posZ,interiorId,Dimension posX, posY,posZ,interiorId,Dimension posX, posY,posZ,interiorId,Dimension posX, posY,posZ,interiorId,Dimension } then the same thing in the script, but you can rob all the markers and these markers respawn ..
-
Hello guys. I made a very simple shop rob, but i want to make this better. My idea is i can add more "markers" with a different dimension/interior, in one script, and all marker can be robbed. How can i make that? Can anyone help me please? I'm not that best scripter, just started 4/5 month ago.. Thanks any help. Here is the script: local settings = {} function on_shop_start1() if isElement(created_shopMarker_1) then return end settings.markerX, settings.markerY, settings.markerZ = 369.48327636719, -6.5628895759583, 1001 settings.dim = 1 settings.int = 9 settings.BlipID = 47 settings.Type = "cylinder" settings.size = 1 settings.R, settings.G, settings.B = 203,150,25 settings.alpha = 100 created_shopMarker_1 = createMarker(settings.markerX,settings.markerY,settings.markerZ,settings.Type,settings.size,settings.R, settings.G, settings.B,settings.alpha) AttachBlip = createBlipAttachedTo(created_shopMarker_1,settings.BlipID) setElementCollisionsEnabled(created_shopMarker_1,false) setElementInterior(created_shopMarker_1,settings.int) setElementDimension(created_shopMarker_1,settings.dim) end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),on_shop_start1) function shopROB_1(source) local playercount = getPlayerCount() if isElementWithinMarker(source, created_shopMarker_1) and getElementType(source) == "player" then if tonumber(playercount) > 0 then setElementFrozen(source, true) setPedAnimation(source , "rob_bank", "cat_safe_rob",2*30000, true, true, true, false) outputChatBox(getPlayerName(source).."Started robbing the shop.",root,255,255,255,true) setTimer(function() setElementFrozen(source,false) random = math.random(1500,40000) exports["rc_core"]:giveMoney(source,tonumber(random)) destroyElement(created_shopMarker_1) destroyElement(AttachBlip) end,2*30000, 1) setTimer(function() on_shop_start1() end,1800000,1) else outputChatBox("Not enough player.",source,255,255,255,true) end else outputChatBox("You not in a marker",source,255,255,255,true) end end addCommandHandler("shoprob",shopROB_1)
-
attempt to index field '?' a nil value
-
Hello, whats the problem? interiors = { -- ID, posX, posY ,posZ, ?, ?, music { 3, 975.26, -8.64, 1001.14, 90, 20, true }, -- 1 Business_StripClub1 { 11, 501.84, -67.84, 998.75, 180, 15, true }, -- 2 Ten_Green-Bottles { 5, 772.43, -5.19, 1000.72, 0, 20 }, -- 3 LS_Ganton_GYM { 3, 975.26, -8.64, 1001.14, 90, 20, true }, -- 4 StripClub { 3, 965.16015625, -53.408203125, 1001.1245727539, 90, 20, true }, -- 5 StripclubVIPArea { 3, 834.61, 7.54, 1004.18, 90, 20 }, -- 6 BettingShop { 3, 834.61, 7.54, 1004.18, 90, 20 }, -- 7 BettingShop2 { 3, 1212.18, -25.93, 1000.95, 180, 10, true }, -- 8 SmallStripClub { 18, 1306.86, 6.83, 1001.02, 90, 40 }, -- 9 FullWarehouse { 1, 1412.14, -2.28, 1000.92, 115, 20 }, -- 10 UnfWarehouse { 3, 418.75, -84.31, 1001.80, 0, 10 }, -- 11 GantonBarbers { 3, 390.44, 173.91, 1008.38, 90, 30 }, -- 12 CityHall { 3, 207.01, -139.91, 1003.50, 0, 20 }, -- 13 Prolapstore { 3, -100.40, -24.96, 1000.71, 0, 20 }, -- 14 LrgSexShop { 3, -204.31, -44.08, 1002.27, 0, 20 }, -- 15 TatooParlour { 17, -204.23, -8.88, 1002.27, 0, 20 }, -- 16 TatooParlour2 { 17, -25.91, -188.05, 1003.54, 0, 30 }, -- 17 Business_24/7 { 5, 372.18, -133.28, 1001.49, 0, 20 }, -- 18 Business_Pizza { 17, 377.16, -192.91, 1000.64, 0, 20 }, -- 19 Business_Donut { 7, 315.79, -143.27, 999.60, 0, 20 }, -- 20 BUSINESS ammunation { 5, 227.08, -8.14, 1002.21, 90, 20 }, -- 21 BUSINESS victim { 10, 6.05, -31.27, 1003.54, 0, 20 }, -- 22 BUSINESS 24/7 { 7, 773.93, -78.49, 1000.66, 0, 20 }, -- 23 BUSINESS GYM { 1, 613.52, 3.31, 1000.92, 180, 30 }, -- 24 BUSINESS GARAGE { 1, 285.39, -41.44, 1001.51, 0, 20 }, -- 25 BUSINESS AMMU { 1, 203.79, -50.34, 1001.80, 0, 20 }, -- 26 BUSINESS SUBURB { 7, -1409.35, -255.91, 1043.66, 250, 20, true }, -- 27 BUSINESS LSFORUM { 2, 1204.81, -13.60, 1000.92, 0, 20, true }, -- 28 BUSINESS STRIP { 10, 2019.02, 1017.93, 996.87, 90, 35 }, -- 29 BUSINESS 4DRAGON { 10, -1128.64, 1066.33, 1345.74, 270, 20 }, -- 30 BUSINESS ZEROS RC BATTLEFIELD { 10, 362.88, -75.11, 1001.50, 315, 20 }, -- 31 BUSINESS BurgerShot { 1, 2233.92, 1714.58, 1012.38, 180, 20 }, -- 32 BUSINESS Caligula { 2, 411.63, -23.06, 1001.80, 0, 20 }, -- 33 BUSINESS_Haircut { 18, -31.02, -91.92, 1003.54, 0, 20 }, -- 34 BUSINESS 24/7 { 18, 161.46, -96.72, 1001.80, 0, 20 }, -- 35 BUSINESS Zip { 3, -2636.77, 1402.60, 906.46, 0, 35, true }, -- 36 BUSINESS Jizzy { 2, 2541.72, -1303.89, 1025.07, 265, 20 }, -- 37 BUSINESS Bigsmoke Crackhouse [line 42] { 1, -2158.81, 643.14, 1052.37, 180, 20 }, -- 38 BUSINESS Horsebetting { 14, 204.44, -168.58, 1000.52, 0, 20 }, -- 39 BUSINESS DidierSach { 12, 1133.25, -15.26, 1000.67, 0, 20 }, -- 40 Casino { 14, -1464.86, 1556.02, 1052.53, 0, 20, true }, -- 41 Motorcross { 17, 493.34, -24.48, 1000.67, 0, 20, true }, -- 42 Alhambra { 18, 1726.86, -1638.05, 20.22, 180, 20 }, -- 43 Atrium { 16, -204.41, -27.22, 1002.27, 0, 15 }, -- 44 Tattooparlor { 16, -25.68, -140.99, 1003.54, 0, 20 }, -- 45 24/7 { 15, 2214.62, -1150.38, 1025.79, 270, 40 }, -- 46 Jefferson Motel { 1, 681.70, -451.37, -25.61, 180, 20 }, -- 47 Welcome Pump { 15, 207.58, -111.00, 1005.13, 0, 20 }, -- 48 Binco's { 15, -1424.42, 928.36, 1036.39, 350, 20, true }, -- 49 Arena { 1, 1539.5, 1315.90002, 10.8, 270, 20 }, -- 50 Old Bank in Palomino Creek, no actual interior, tp coords are wrong too { 18, -229.17, 1401.14, 27.76, 270, 20, true }, -- 51 Lil' Probe Inn { 4, 285.71, -86.37, 1001.52, 0, 20 }, -- 52 Ammunation { 4, 460.18, -88.41, 999.55, 90, 20, true }, -- 53 Restaurant { 4, -27.30, -31.41, 1003.55, 0, 20 }, -- 54 24/7 { 1, 964.94, 2159.97, 1011.03, 90, 20 }, -- 55 Sindacco Meat Factory { 12, 411.86, -54.20, 1001.89, 0, 10 }, -- 56 Barber { 6, 774.20, -50.20, 1000.58, 0, 20 }, -- 57 San Fierro Gym { 3, 1494.28, 1303.91, 1093.28, 0, 20 }, -- 58 Office { 6, -2240.298828125, 128.5859375, 1035.4210205078, 270, 20 }, -- 59 Zero's RC Shop { 6, 297.05, -111.79, 1001.51, 0, 20 }, -- 60 Small Ammunation { 6, 316.37, -170.02, 999.59, 0, 20 }, -- 61 Small Ammunation { 6, -27.15, -57.87, 1003.54, 0, 20 }, -- 62 24/7 { 9, 364.95, -11.60, 1001.85, 0, 20 }, -- 63 Cluckin' Bell { 1, 2266.32, 1647.59, 1084.23, 270, 20 }, -- 64 Hotel Huge { 3, -2029.61, -119.36, 1035.17, 0, 20 }, -- 65 DMV { 8, 2365.14, -1135.35, 1050.87, 0, 30 }, -- 66 House_Luxury Medium { 8, -42.65, 1405.46, 1084.42, 0, 20 }, -- 67 HOUSE_SmallMedium { 9, 83.00, 1322.48, 1083.86, 0, 25 }, -- 68 HOUSE_Luxury { 9, 260.67, 1237.32, 1084.25, 0, 20 }, -- 69 HOUSE_Medium { 3, 616.22906494141, -131.02648925781, 999.8, 360, 20 }, -- 70 Garage { 5, 2233.57, -1115.08, 1050.88, 0, 20 }, -- 71 HOUSE_BEDROOM { 2, 446.97, 1397.22, 1084.30, 0, 20 }, -- 72 HOUSE_Medium { 4, 261.14, 1284.56, 1080.25, 0, 20 }, -- 73 HOUSE_Medium { 15, 295.05, 1472.36, 1080.25, 0, 20 }, -- 74 HOUSE_Medium { 3, 235.44, 1186.83, 1080.25, 0, 30 }, -- 75 HOUSE_big { 2, 226.48, 1239.87, 1082.14, 90, 20 }, -- 76 HOUSE_medium { 1, 223.22, 1287.17, 1082.14, 0, 20 }, -- 77 HOUSE_medium { 5, 226.56, 1114.19, 1080.99, 270, 30 }, -- 78 HOUSE_Luxury { 5, 2233.53, -1115.26, 1050.88, 0, 30 }, -- 79 HOUSE_Hotelroom { 9, 2317.81, -1026.55, 1050.21, 0, 20 }, -- 80 HOUSE_Luxury { 10, 2259.68, -1136.09, 1050.63, 270, 10 }, -- 81 HOUSE_crap { 10, 422.26, 2536.37, 10.00, 90, 20 }, -- 82 HOUSE_desertaitport { 14, 254.46, -41.60, 1002.02, 270, 10 }, -- 83 HOUSE_wardrobe { 5, 1260.84, -785.42, 1091.90, 270, 30 }, -- 84 HOUSE_Maggod { 2, 266.56, 305.02, 999.14, 270, 10 }, -- 85 HOUSE_BEDROOM { 3, 2496.03, -1692.17, 1014.74, 180, 30 }, -- 86 HOUSE_CJ { 2, 2468.77, -1698.25, 1013.50, 90, 30 }, -- 87 HOUSE_RYDER { 2, 2237.52, -1081.64, 1049.02, 0, 20 }, -- 88 HOUSE_Medium { 1, 2218.24, -1076.27, 1050.48, 90, 20 }, -- 89 HOUSE_Hotelroom { 6, 744.46, 1436.68, 1102.70, 0, 20 }, -- 90 HOUSE_WHORE { 8, 2807.66, -1174.54, 1025.57, 0, 20 }, -- 91 HOUSE_Medium { 6, 234.20, 1063.85, 1084.21, 0, 35 }, -- 92 HOUSE_MansionLuxury { 4, -260.78, 1456.73, 1084.36, 90, 25 }, -- 93 HOUSE_Luxury { 5, 22.98, 1403.60, 1084.42, 0, 20 }, -- 94 HOUSE_LowLuxury { 5, 140.39, 1366.36, 1083.85, 0, 35 }, -- 95 HOUSE_UltraLuxury { 12, 2324.42, -1149.20, 1050.71, 0, 25 }, -- 96 HOUSE_Luxory { 10, 24.00, 1340.33, 1084.37, 0, 20 }, -- 97 HOUSE_Medium { 4, 221.77, 1140.43, 1082.60, 0, 20 }, -- 98 HOUSE_MEDIUM { 6, 343.98, 305.14, 999.14, 270, 15 }, -- 99 HOUSE_Kinkyroom { 6, -68.83, 1351.46, 1080.21, 0, 20 }, -- 100 HOUSE_Medium { 10, 246.37, 107.51, 1003.21, 0, 20 }, -- 101 BUSINESS_PD_BANK { 3, 289.77, 171.74, 1007.17, 0, 20 }, -- 102 PDBUSINESS { 5, 322.24, 302.45, 999.14, 0, 20 }, -- 103 PD_FortCarson { 6, 246.85, 62.49, 1003.64, 0, 20 }, -- 104 PD_LS { 1, -794.98, 489.78, 1376.20, 0, 20, true }, -- 105 MARCO'S_BISTRO (LIBERTY CITY) { 6, 2196.85, -1204.40, 1049.00, 0, 20 }, -- 106 SAFEHOUSE 13 - HIGH { 10, 2270.41, -1210.46, 1047.56, 0, 20 }, -- 107 SAFEHOUSE 14 - MEDIUM-HIGH { 6, 2308.80, -1212.94, 1049.02, 0, 20 }, -- 108 SAFEHOUSE 15 - LOW { 6, 2333.00, -1077.00, 1049.00, 0, 20 }, -- 109 SAFEHOUSE 8 - LOW { 5, 318.55, 1114.47, 1083.88, 0, 20 }, -- 110 BALLAS CRACK DEN { 2, 613.6552734375, -74.5078125, 997.9921875, 0, 20 }, -- 111 Garage { 2, 1.90, -3.20, 999.40, 0, 20 }, -- 112 Trailer (custom) { 6, 2438.35, -2537.32, 5095.43, 0, 20 }, -- 113 Warehouse (custom) { 7, 225.71, 1021.44, 1084.01, 0, 20 }, -- 114 HOUSE HIGH { 8, 2480.60, -1687.23, 2031.49, 0, 20 }, -- 115 RESTROOM/TOILET (custom) { 18, 1296.6310, 0.5920, 1001.0230, 0, 20},-- 116 Warehouse 2 { 17, -942.1320, 1849.1420, 5.0050, 0, 20},-- 117 Gát { 13, -2043.966,172.932,28.835, 0, 20},-- 118 Cj garázs { 10, 246.4410,112.1640,1003.2190 , 0, 20},-- 119 SFPD hq { 10, 1891.3960,1018.1260,31.8820 , 0, 20},-- 120 Janitor room(Four Dragons Maintenance) { 3, 1527.38,-11.02,1002.10 , 0, 20},-- 121 BDup háza { 1, 2147.7578125, 1603.369140625, 1006.1677246094, 0, 20},-- 122 Széf { 1, 451.90347290039, -18.80481338501, 1001.1328125, 0, 20},-- 123 Vmi panzió { 0, 662.6435546875, -573.5361328125, 16.3359375, 0, 20},-- 124 Bolt { 5, 1298.908203125, -796.3720703125, 1084.0078125, 0, 20},-- 125 Bolt { 0, 1170.6301269531,-1322.4461669922,31.770313262939, 0, 20},-- 126 Kórház { 0, 1409.6337890625, -1015.2216796875, 9995.7001953125, 0, 20},-- 127 Kibaszott nagy bank { 1, 484.9677734375, -2378.4609375, 10.783366203308, 0, 20},-- 128 Supermarket { 83, 1716.6827392578, -1904.7586669922, -37.323436737061,0,0},-- 129 Banda terület { 83, 1716.6827392578, -1904.7586669922, -37.323436737061,0,0},-- 130 Banda terület } addCommandHandler("setin",function(player,cmd,interiors) if interiors then setElementInterior(player,interiors[1],interiors[2],interiors[3],interiors[4]) else outputChatBox(syntax.." /"..cmd.." [InteriorID]",player,255,255,255,true) end end) Debug: 42 setElementInterior expected number at argument 2 got nil
-
hmm. I want check the player money, and the money is positive addCommandHandler("double", function(p, cmd, money) if tonumber(money) then local mny = tonumber(money) local rnd = math.random(1, 100) if mny <= 0 then outputChatBox("Bigger than 0",p) elseif exports["core"]:getMoney(p) >= mny then -- 8 if rnd <= 50 then exports["core"]:takeMoney(p, mny) else exports["core"]:giveMoney(p, mny) end end end end ) attemt to comapre number with nil
-
Hi. I want to make a script, when player type /double "Amount", it take the player money, with math.random, when number numbers under 50 = give back the double money to player, if numbers above 50 = then just take the player money. Anybody can help me please what should i use for this? Thanks!
-
Attempt to compare number with boolean [HELP PLS]
itHyperoX replied to Tibi [NextMTA]'s topic in Scripting
from this server: https://www.youtube.com/watch?v=j2WlOyvdKAk&t=9632s And other parts of this script addCommandHandler("makeveh", function(player, _, ownerID, modelID, faction, r, g, b) if getElementData(player, "acc:admin") >= 7 then if not modelID or not tonumber(ownerID) then outputChatBox(rovid .. " /makeveh [Név/ID] [Model] [Frakció] [R] [G] [B]", player, 0, 0, 0, true) return end target, targetName = exports.mta_main:findPlayer(player, ownerID) if not target then return else ownerID = getElementData(target, "char:id") end if not tonumber(faction) then faction = 0 end if not tonumber(r) then r = 0 end if not tonumber(g) then g = 0 end if not tonumber(b) then b = 0 end r = tonumber(r) g = tonumber(g) b = tonumber(b) local vehname = tonumber(modelID) if not vehname then vehname = getVehicleModelFromName(modelID) end if not vehname then outputChatBox(rovid .. " Hibás jármű név vagy id", player, 0, 0, 0, true) return end local x, y, z = getElementPosition(target) local insertQuery = dbQuery(con, "INSERT INTO vehicle SET model=?, owner=?, pos=?, color=?, faction=?, rendszam=?", vehname, ownerID, toJSON({x,y,z}), toJSON({r,g,b}), faction, "modify") local insertResult, _, insertID = dbPoll(insertQuery, -1) if insertResult then addVehicle(ownerID, vehname, x, y, z, insertID, r, g, b, faction) exports.mta_item:giveItem(target, 34, insertID, 1, 0) exports.mta_admin:outputDeveloperMessage("#7cc576"..player:getData("char:anick").." #fffffflétrehozott egy járművet (ID: "..insertID.." Tulaj: "..targetName:gsub("_", " ")..")") dbFree(insertQuery) end end end) addCommandHandler("delveh", function(player, _, vehID) if getElementData(player, "acc:admin") < 7 then return end if not tonumber(vehID) then outputChatBox(rovid .. " /delveh [ID]", player, 0, 0, 0, true) return end vehID = tonumber(vehID) for _, car in ipairs(getElementsByType("vehicle")) do if tonumber(car:getData("veh:id")) == vehID then if getElementData(car, "rent.Owner") then setElementData(getElementData(car, "rent.Owner"), "rent.Car", false) end destroyElement(car) delQuery = dbQuery(con, "DELETE FROM vehicle WHERE id=?", vehID) exports.mta_admin:outputDeveloperMessage("#7cc576"..player:getData("char:anick").." #fffffftörölt egy járművet (ID: "..vehID..")") dbFree(delQuery) end end end) function addVehicle(tulajID, modelID, x, y, z, sqlID, r, g, b, fraki) if not fraki then fraki = 0 end local vehicleCreate = createVehicle(modelID,x,y,z) local str = "abcdefghijklmnopqrstuvwxyz" local plate = "" for index = 1, 3 do plate = plate .. string.char(str:byte(math.random(1, #str))) end plate = string.upper(plate) plate = plate .. "-" for index = 1, 3 do plate = plate .. math.random(1, 9) end setVehiclePlateText(vehicleCreate, plate) local insertQuery = dbQuery(con, "UPDATE vehicle SET rendszam=? WHERE id=?", plate, tonumber(sqlID)) dbFree(insertQuery) vehicleCreate:setData("veh:id",tonumber(sqlID)) vehicleCreate:setData("veh:perm",true) vehicleCreate:setData("veh:interior",0) vehicleCreate:setData("veh:dimension",0) vehicleCreate:setData("veh:fuel",10) vehicleCreate:setData("veh:light",true) vehicleCreate:setData("veh:motor",false) vehicleCreate:setData("veh:owner",tonumber(tulajID)) for _, v in ipairs(getElementsByType("player")) do if v:getData("char:id") == tulajID then oname = v:getData("char:name") end end vehicleCreate:setData("veh:oname", oname) vehicleCreate:setData("veh:faction",tonumber(fraki)) vehicleCreate:setData("handbrake",false) setVehicleColor(vehicleCreate,r,g,b) setVehicleOverrideLights(vehicleCreate, 1) -- Kikapcsolva setElementInterior(vehicleCreate,0) setElementDimension(vehicleCreate,0) if getVehicleType(vehicleCreate) == "BMX" then setVehicleEngineState(vehicleCreate,true) else setVehicleEngineState(vehicleCreate,false) end end function saveVehicle(veh) local dbid = tonumber(getElementData(veh, "veh:id")) or 0 if isElement(veh) and tostring(getElementType(veh)) == "vehicle" and dbid >= 0 then local fuel = getElementData(veh, "veh:status") local engine = getElementData(veh, "veh:motor") or false local locked = isVehicleLocked(veh) local fuel = getElementData(veh, "veh:fuel") local neon = tonumber(getElementData(veh, "veh:neon") or 0) local lights = getVehicleOverrideLights(veh) local health = getElementHealth(veh) local wheel1, wheel2, wheel3, wheel4 = getVehicleWheelStates(veh) local wheelState = toJSON( { wheel1, wheel2, wheel3, wheel4 } ) local panel0 = getVehiclePanelState(veh, 0) local panel1 = getVehiclePanelState(veh, 1) local panel2 = getVehiclePanelState(veh, 2) local panel3 = getVehiclePanelState(veh, 3) local panel4 = getVehiclePanelState(veh, 4) local panel5 = getVehiclePanelState(veh, 5) local panel6 = getVehiclePanelState(veh, 6) local panelState = toJSON( { panel0, panel1, panel2, panel3, panel4, panel5, panel6 } ) local door0 = getVehicleDoorState(veh, 0) local door1 = getVehicleDoorState(veh, 1) local door2 = getVehicleDoorState(veh, 2) local door3 = getVehicleDoorState(veh, 3) local door4 = getVehicleDoorState(veh, 4) local door5 = getVehicleDoorState(veh, 5) local doorState = toJSON( { door0, door1, door2, door3, door4, door5 } ) local x,y,z = getElementPosition(veh) local int = getElementInterior(veh) local dim = getElementDimension(veh) --local pos = toJSON({x,y,z,int,dim}) if dbPoll ( dbQuery( con, "UPDATE vehicle SET panel=?, wheel=?, door=?, fuel=?, motor=?, status=?, lampa=?, hp=? WHERE id='?'", panelState, wheelState, doorState, fuel, engine, locked, lights, health,dbid), -1 ) then -- outputDebugString("Mentve") end -- if dbPoll (dbQuery( kapcsolat,"UPDATE jarmuvek SET TuningMotor=?,TuningTurbo=?,TuningGumi=?,TuningFek=? WHERE id=?",Motor,Turbo,Gumik,Fek,dbid), -1 ) then -- outputDebugString("Jármű teljesítmény-ek mentve!") -- end end end function saveAllVeh() local count = 0 for i, p in ipairs(getElementsByType("vehicle")) do if (tonumber(getElementData(p, "veh:owner") or 0) >= 1) then saveVehicle(p) count = count + 1 end end outputDebugString("El lett mentve "..count.." kocsi adata!",0,0,130,150) end -
Attempt to compare number with boolean [HELP PLS]
itHyperoX replied to Tibi [NextMTA]'s topic in Scripting
thats not your script. Make it your own. (Leaked script) -
Hello guys, i'm currently working on pilot job, but i got some problems. How can i make this work? What i want: When player spawned the job vehicle, the player get a random checkpoint in another airport. When he hit the checkpoint, new checkpoint created from table. local posTable = { {{-1341.5460205078, -149.02934265137, 14.1484375}}, {{-1586.5443115234, -214.85159301758, 14.1484375}}, {{-1478.2484130859, 12.554589271545, 14.369514465332}} } function createRandomPos() local rTable = posTable[math.random(#posTable)] spawnX, spawnY, spawnZ = unpack(rTable) jobMarker = createMarker(spawnX,spawnY,spawnZ,"checkpoint",2,255,255,0,100) end addEvent("startPilotMarkers",true) addEventHandler("startPilotMarkers",root,function() createRandomPos() addEventHandler("onClientMarkerHit",jobMarker,function() destroyElement(jobMarker) outputChatBox("Success") createRandomPos() end) end)
-
function toggleFRWindow() if getElementData(localPlayer,"Jailed") == true then cancelEvent() end if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() end end
-
if showWho ~= true then outputChatBox("** #FFFF00You Jailed [ "..getPlayerName(thePlayer).." #FFFF00] at "..theJail[1].." For "..time,source,255,0,0,true) outputChatBox("** #FFFF00You Have Been Jailed By [ "..getPlayerName(source).." #FFFF00] at "..theJail[1].." For "..time,thePlayer,255,0,0,true) setElementData(thePlayer,"Jailed",true) end go to freeroam, find the "bindkey", then if getElementData(localPlayer,"Jailed") == true then return outputChatBox("You can't use this when you arrested") end