1LoL1
Members-
Posts
944 -
Joined
-
Last visited
Everything posted by 1LoL1
-
Hello, i created script but idk how to respawnVehicle if is in water. Can anyone help me please? i tried this but not work addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function () car = createVehicle(id, x, y, z, rx, ry, rz) end) function RSP () if isElementInWater(car) then setTimer(respawnVehicle(car), 1000, 1) end end This work normally. addEventHandler("onVehicleExplode", getRootElement(), function () setTimer(respawnVehicle, 5000, 1, source) end)
-
ElementData setElementData for health doesn't exist. Use setElementHealth & getElementHealth.
-
Try this: db_name = "db" host = "host" user = "user" password = "pass" db = dbConnect( "mysql", "dbname="..db_name..";host="..host, user, password )
-
Stolen = This Original = This DONE
-
Post the code.
-
So delete addEventHandler("Open", getRootElement(), open) addEventHandler("Close", getRootElement(), close)
-
1 - Where is defined "col" ? 2 - Where you created door you must put cordinates x, y, z now it's there only 1 not 3. Example: createObject(id, x, y, z, 90, 0, 0)
-
Try this: door = createObject (974, 267.70001220703) -- here put cordinates function Open (pla) local vehicle = getPedOccupiedVehicle(pla) if getElementType ( pla ) == "player" then if vehicle or not vehicle then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (door, 2200, 2743.29998779297, -2298, 4.3000001907349) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. else outputChatBox("text", pla, 255, 255, 255, true) end end end end addEventHandler("onColShapeHit", col, Open) addEventHandler("Open", root, Open) function Close ( pla ) local vehicle = getPedOccupiedVehicle(pla) if getElementType ( pla ) == "player" then if vehicle or not vehicle then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (door, 2951, 267.70001220703, -2298.1000976563, 4.3000001907349) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. else outputChatBox("text", pla, 255, 255, 255, true) end end end end addEventHandler("onColShapeLeave", col, Close ) addEventHandler("Close", root, Close)
-
1 - in comunity or created by me? 2 - idk 3 - Yes because I want him to fix
-
Hello, i have this code but i don't know really why not work i want when i go traveled 100 meters i get 1x getElementData "M" i i go traveled 1000 meters i get 1 getElementData "KM" but not work function () if (isPedInVehicle(getLocalPlayer())) then x,y,z = getElementPosition(getLocalPlayer()) oX,oY,oZ = getElementPosition(getLocalPlayer()) distanceTraveled = getDistanceBetweenPoints3D(x,y,z,oX,oY,oZ) if distanceTraveled == 100 then setElementData(localPlayer, "M", (getElementData(localPlayer, "M") or 0) + 1) elseif distanceTraveled == 1000 then setElementData(localPlayer, "KM", (getElementData(localPlayer, "KM") or 0) + 1) end end end
-
Hello, i need help. I know what is "getColorFromString" Example: color = "#00FF00" r, g, b = getColorFromString(color) -- result: 0, 255, 0 but my question is how i can to hex of RGB? Example: color = "0, 255, 0" -- result: 00FF00 how i can to this? please can anyone help me?
-
addEvent("rocket", true) addEventHandler("rocket", root, function bossweapon (weapon, ammo) givePedWeapon(nemesi, 35, 5000, true) setPedWeaponSlot (nemesi, 7) end) addEventHandler("givePedWeapon", getRootElement(), bossweapon)
-
Try restart server if not work then sorry
-
What not work? errors / warnings?
-
addEvent ( "rocket", true ) addEventHandler ( "rocket", root, function bossweapon (weapon, ammo) givePedWeapon(nemesi, 31, 5000, true) end addEventHandler( "givePedWeapon", getRootElement(), bossweapon) -- here you had bosseapon not bossweapon
-
Wrong? if he want set health he must use only setElementHealth not setElementData..
-
Try this: addEvent("onZombieWasted", true) addEventHandler("onZombieWasted", getRootElement(), function (attacker) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(attacker)),aclGetGroup("Soldier")) then setElementHealth(attacker, (getElementHealth(attacker) or 0) + 5) end end)
-
ok it's solved (idk how to use "gettok" in the code)
-
addEvent("onZombieWasted", true) addEventHandler("onZombieWasted", getRootElement(), function (attacker) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(attacker)),aclGetGroup("Soldier")) then if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then setElementHealth(attacker, getElementHealth(attacker) + 5) end end end )
-
Pff i really don't know this function so i don't know how i can use in this my code.
-
Now in database is "255, 255, 255" but when i go setElementData(source, "RGB" its 3 in 1. So now how i can get to Car Lights??? Example: local w = {255,255,255} r = w[1] g = w[2] b = w[3] and lights will normally r, g, b
