-
Posts
1,134 -
Joined
-
Last visited
-
Days Won
37
Everything posted by NeXuS™
-
Do you have something like this? if (newValue == 58) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end
-
And which one needs a bigger size?
-
Can you copy the whole code from there? @Actimel
-
You are right. dxDrawRectangle(100, 100, 100, #testItems > drawItems and #testItems*15 or drawItems*15)
-
You'll have to do some calculations about it. local testItems = {} local drawFrom = 1 local drawItems = 5 for i = 1, 20 do table.insert(testItems, i) end function dxDrawComboBox() dxDrawRectangle(100, 100, 100, testItems > drawItems and drawItems*15 or #testItems*15) for i, k in pairs(testItems) do if i >= drawFrom and i <= drawFrom+drawItems then dxDrawText(k, 100, 100+(i-1)*15) end end end bindKey("mouse_wheel_down", "down", function() if #testItems > drawItems and drawFrom < #testItems then drawFrom = drawFrom+1 end end) bindKey("mouse_wheel_up", "down", function() if drawItems > 1 then drawFrom = drawFrom - 1 end end) Didn't test, but should work. If you need further help, feel free to ask here.
-
if (newValue == 26) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); elseif (newValue == YOURBACKPACKSIZE) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); setObjectScale(elementBackpack[source], 1.5) else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end You can do this.
-
We need the code of the server sided script too.
-
local colSphere = createColSphere(0, 0, 0, 20) setTimer(function() for i, k in ipairs(getElementsWithinColShape(colSphere)) do if getElementType(k) == "player" then if getElementHealth(k) < 100 then setElementHealth(k, getElementHealth(k)+1) end end end end, 1000, 0) Should work. If any error appears, feel free to ask here.
-
Is your "saveInfo" and "updateDogSkin" function below those addEventHandler functions?
-
This one wont work with processLineOfSight because of this: Did a bypass with a little trick. Tested and worked for me. function onMapImageDoubleClick(button, state, absX, absY) if (not absX or not absY) then return end local absX, absY = absX-x*402-x*10, absY-y*120-y*7 local mapWidth, mapHeight = x*600, y*551 local relX, relY = absX/mapWidth, absY/mapHeight local x = relX*6000 - 3000 local y = 3000 - relY*6000 local hit, hitX, hitY, hitZ setElementPosition(localPlayer, x, y, 0) setElementFrozen(localPlayer, true) setTimer(function() hit, hitX, hitY, hitZ = processLineOfSight(x, y, 200, x, y, -200) setElementPosition(localPlayer, x, y, hitZ+2) setElementFrozen(localPlayer, false) --guiSetVisible(jobMapIm, false) --showCursor(false) end, 300, 1) end If you need further help, feel free to ask here.
-
Try searching for createVehicle in the freeroam's GUI scripts.
-
Try this one: addEventHandler("onPlayerChat", root, function(message, msgTyp) local message = string.lower(message) for i,v in ipairs(cancelableworld) do if (string.find(message, cancelableworld[i])) then outputChatBox("*NO*", source, 255, 0, 0, false) cancelEvent() return end end local Level = getElementData(source,"Level" or 0) outputChatBox("#4C7759[LVL "..Level.."] #FFFFFF"..getPlayerName(source)..": #FFFFFF"..message,getRootElement(),255,2555,255,true) end)
-
Thats not the case Fist, both method is working.You'll have to melt those two codes together. If you need further help, feel free to ask here.
-
Did you try sending it out in the chatBox? (outputChatBox)
-
Use a setTimer with a 60000ms interval to decrease everyone's mute time by 1.
-
Try this: addPedClothes(source, texture, model, type) You are actually writing those args in the wrong sequence.
-
addEventHandler("onPlayerChat", getRootElement(), function() if getElementData(source, "muted") then cancelEvent() end end) And add just a command (addCommandHandler) to admins and use setElementDatas for the mute. If you need further help, feel free to ask here.
-
You could cycle through all items via a for cycle and if every item equals to 0 in it, just delete it.
-
Did you try setting a components alpha? (getVehicleComponents() and then use maybe a for cycle or just access its data by just calling it. It returns an array of the actual vehicle's components)
-
If you dont mind making your server lag, you can use getAccounts() with a for, and then the "i" arg, which it returns (for i, k in ipairs(getAccounts()) do) is nearly an account ID. Btw, why do you need an account ID?
-
Whats not working with it? Do you get the panel? No TP to there? Thats alright, 0 errors, but whats wrong with the script?...
-
Can you send me a 10 line look into from before? dxDrawColorText ("#00BAFF" .. getPlayerName(player) .. " (" .. isAFK .. ")", sx-w, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), player ~= g_Me and textscale*NAMETAG_TEXTSIZE or (textscale*NAMETAG_TEXTSIZE)/1.5, srfont, "center", "bottom", false, false, false )
-
Do it on client-side, so it doesn't effect your server at all. local nextCheckTime = 10000 local oX, oY, oZ = nil, nil, nil function isAFK() local pX, pY, pZ = getElementPosition(localPlayer) if oX then if pX == oX and pY == oY and pZ == oZ then setElementData(localPlayer, "isAFK", true) elseif getElementData(localPlayer, "isAFK") then setElementData(localPlayer, "isAFK", false) end end oX, oY, oZ = pX, pY, pZ end setTimer(isAFK, nextCheckTime, 0) Now you just have to add the clientRender to do the drawings for everyone.