-
Posts
1,143 -
Joined
-
Last visited
-
Days Won
42
Everything posted by Patrick
-
https://wiki.multitheftauto.com/wiki/GetVehicleWheelStates local frontLeft, rearLeft, frontRight, rearRight = getVehicleWheelStates( vehicleElement )
-
https://wiki.multitheftauto.com/wiki/SetGlitchEnabled maybe
-
https://wiki.multitheftauto.com/wiki/Debugging
-
local dutymarker = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) local dutymarker2 = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) function duty(thePlayer) if isElementWithinMarker(thePlayer, dutymarker) or isElementWithinMarker(thePlayer, dutymarker2) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty)
-
MTA Settings, SFX volume
-
I also think JSON is better and simpler. local table = { [1] = "asd", [2] = "qwe", } local JSON = toJSON(table) -- convert table to JSON. (JSON is a string, you need to store that like a string) print(JSON) -- you can print it local table_again = fromJSON(JSON) -- convert JSON back to table -- table and table_again is equal
-
https://wiki.multitheftauto.com/wiki/SetWorldSoundEnabled
-
local veh = (getElementType(source) == "vehicle") -- if 'source' is a vehicle, 'veh' is true, if not 'veh' is false if veh and isVehicleDamageProof(veh) == false then -- 'veh' is a boolean (true/false) and a boolean can't be damageproof. Fixed local veh = (getElementType(source) == "vehicle") if veh and isVehicleDamageProof(source) == false then
-
https://wiki.multitheftauto.com/wiki/Java_SDK
-
You can store a table, if you convert it to a string before save. https://wiki.multitheftauto.com/wiki/ToJSON https://wiki.multitheftauto.com/wiki/FromJSON local table = { "dogs", cat = "hungry", mouse = "food", birds = 4 } local table_string = toJSON(table) -- result: [ { "1": "dogs", "mouse": "food", "cat": "hungry", "birds": 4 } ] local table_again_from_string = fromJSON(table_string) -- table == table_again_from_string
-
Set variable to false before destroyElement is fine.
-
What is the problem, you don't write it down? By the way, you are copied this code from a tutorial video. (link: https://youtu.be/tQBY8U3T-es?t=8485) Then why do you need help if the solution is in that video? [HUN] Első probléma, hogy nem írtad le mit szeretnél. Honnan találjuk ki? Második, hogy ezt a kódot nem te írtad, csupán lemásoltad. Akkor miért nem abban a videóban keresed a megoldást, ahonnan másoltad? (link: https://youtu.be/tQBY8U3T-es?t=8485)
-
answered in
-
Szia, getElementsByType("player") részt ideiglenesen cseréld ki egy saját táblára, amelyben te, vagyis a localPlayer szerepel sokszor. {localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer} így magad fogod sokszor látni.
-
https://wiki.multitheftauto.com/wiki/PHP_SDK [HUN] Egyébként csinálhatod azt is, hogy mindig SQL-ből kérdezed le és ott is módosítod mindig. Különösebb erőforrást nem igényelne, mert viszonylag keveset van használva a PP. (Persze ha folyamatosan HUD-on szeretnél renderelni, akkor nem)
-
You have to type the difference between old and new positions.
-
You can't disable the push to talk and you can't change the bind for the whole server. Every client can change the bind for himself in the settings.
-
attachElements setCameraTarget
-
-- SERVER SIDE addEvent("onBotWasted",true ) addEventHandler("onBotWasted", root, function() local x, y, z = getElementPosition(source) -- dead zombie's pos for i = 1, 5 do local money = createPickup(x+math.random(-2,2), y+math.random(-2,2), z, 3, 1212, 0) -- place to near random pos addEventHandler("onPickupHit", money, function(player) givePlayerMoney(player, 5000) destroyElement(source) end) end end)
-
I know, but this is a new function, and not the best to check distance.