![](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Firespider
Members-
Posts
238 -
Joined
-
Last visited
Everything posted by Firespider
-
Thanks, but I've already created the data, so the problem won't be there. At least I think so
-
Hello, I would like to make the system check that the player has entered a good password. But for some reason this line of code is not good. server side: addEvent("attemptLogin", true) addEventHandler("attemptLogin", resourceRoot, function(username, pass) local serial = getPlayerSerial(client) dq = dbQuery(db, "SELECT * FROM accounts WHERE serial=?", serial) result = dbPoll(dq, 500) if (#result > 0) then if (result[1]["username"] == username) then if (result[2]["password"] == pass) then outputChatBox("Sikerült") else outputChatBox("Nem Sikerült") end end end end) client side: function Login() if Data[1][1] ~= "" or Data[1][2] ~= "" then triggerServerEvent("attemptLogin", resourceRoot, Data[1][1], hash("sha512", Data[1][2])) else LogAlert("EmptyRectangle") end end Error code:
-
Hello, I put a little Cholshape in one place and didn't write why it doesn't take place when the player enters the cholshape. addEventHandler( "onClientElementColShapeLeave", resourceRoot, function (hitPlayer, mDim, hitElement) if (mDim) then if (hitPlayer == source) then if (hitElement == TheSensor or hitElement == TheSensor1) then GateMenu = false end end end end );
-
Please help me.
-
Hi, I'm sending you a basic code that you can use to do it. Maybe the code won't work, I haven't tested it, but try it. local sx, sy = guiGetScreenSize() local relx, rely = sx / 1920, sy / 1080 local Menu = false addEventHandler("onClientRender", root, function() if (Menu) then dxDrawRectangle(sx * 0.35, sy * 0.4, sx * 0.3, sy * 0.4, tocolor(20, 30, 40, 200)) -- Alap end end) function OpenPanel() if not (Menu) then Menu = true else Menu = false end end bindKey("F6", "Down", OpenPanel)
-
Hello, I would like to make sure that I have a gate created on the server side and I don't want it to be broken, e.g. with a car, when you go to it. I tried with triggerClientEvent but it is not good, it says that the event is not found on the client side, can anyone help?
-
Hello, I want to write a border system, but when the gate opens, it doesn't close again for some reason. local sx, sy = guiGetScreenSize(); local relx,rely = sx/1920,sy/1080; local GateMenu = false local GateStatus = false local TheGate = createObject(1468, 51.62455, -1524.62549, 5.05399, 0, 0, 90); local TheSensor = createColSphere(55.60476, -1524.89941, 5.00539, 3); color = tocolor(10, 20, 30, 255) addCommandHandler("devmode", function() setDevelopmentMode(true); end ) addEventHandler("onClientRender", root, function() if (GateMenu) then dxDrawRectangle(sx*.35, sy*.4, sx*.3, sy*.05, tocolor(10, 20, 10, 255)) -- fejléc dxDrawRectangle(sx*.35, sy*.4, sx*.3, sy*.40, tocolor(20, 30, 40, 200)) -- Alap dxDrawRectangle(sx*.42, sy*.6, sx*.15, sy*.08, color1) -- Gomb(Megvásárlás) dxDrawText('Határ rendszer', sx*.70, sy*.8, sx*.3, sy*.05, relx2, rely*2, "default-bold", "center", "center", false, false, false) dxDrawText('Fizesd ki a határt ára: 5000 FT', sx*.70, sy*.9, sx*.3, sy*.05, relx2, rely*2, "default-bold", "center", "center", false, false, false) dxDrawText('Ki fizetés', sx*.84, sy*.9, sx*.15, sy*.380, relx2, rely*2, "default-bold", "center", "center", false, false, false) GlowedButton(); end end ) bindKey ("m", "down", function() showCursor( not isCursorShowing() ) end) function isMouseInPosition ( x, y, width, height )-- Kurzor lekérése if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end function GlowedButton() if (GateMenu) then if (isMouseInPosition(sx*.42, sy*.6, sx*.15, sy*.08)) then color1 = color else color1 = tocolor(5, 10, 15, 255) end end end local veh = getO addEventHandler("onClientElementColShapeHit", root, function(hitElement, matchingDimension) if matchingDimension then if hitElement == TheSensor then GateMenu = true end end end) addEventHandler("onClientElementColShapeLeave", root, function(hitElement, matchingDimension) if matchingDimension then if hitElement == TheSensor then GateMenu = false end end end) addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if GateMenu and button == "left" and state == "down" then if isMouseInPosition(sx*.42, sy*.6, sx*.15, sy*.08) then GateMenu = false moveObject(TheGate, 5000, 51.62455, -1524.62549, 0) GateStatus = true triggerEvent("Reset", localPlayer) end end end ) addEvent("Reset", true) addEventHandler("Reset", root, function() if (GateStatus) then moveObject(TheGate, 100000, 1468, 51.62455, -1524.62549, 5.05399) end end )
-
Hello, I would like to resolve that if the gate is opened, it is possible to pass through it, but only for a while. Like a border system. addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if GateMenu and button == "left" and state == "down" then if isMouseInPosition(sx*.42, sy*.6, sx*.15, sy*.08) then GateMenu = false moveObject(TheGate, 5000, 51.62455, -1524.62549, 0) GateStatus = true triggerEvent("Reset", localPlayer) end end end ) addEvent("Reset", true) addEventHandler("Reset", root, function() if (GateStatus) then moveObject(TheGate, 100000, 1468, 51.62455, -1524.62549, 5.05399) end end )
-
Help!
-
Hello, for some reason the panel slips when you switch from, for example, 1920x1080 to 1600x800, what's the problem? --///FIRESPIDER NEXON ROLEPLAY//// local sx,sy = guiGetScreenSize();--Képernyő felbontás lekérése. local MenuPoints = {00.35 ,00.20} panel = 1 local font = dxCreateFont('font.otf', 20, false, 'proof') or 'default' -- Egyedi font. color = tocolor(10, 20, 30, 255)-- Gomb szín local Anims = true addEventHandler("onClientRender", root, function() if (Anims) then if (panel == 1) then dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.5, tocolor(50, 60, 70, 230)) -- Panel dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.05, tocolor(20, 30, 40, 255)) -- Panel fejléc dxDrawText('Animációs panel', sx * (MenuPoints[1]) + 200, sy * (MenuPoints[2]) + 15, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 85, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/handsup -- Kezek felemelése.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 90, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 170, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/dance - 1 - 15 -- Tancolás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 180, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 250, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/cpr -- Kompresszió.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 255, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 325, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/fall -- összeesés.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 335, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1] + 175, sy * MenuPoints[2] + 425, sx * 0.1, sy * 0.05, color1 or color) dxDrawText('Következő oldal.', MenuPoints[1] + 865, sy * MenuPoints[2] + 435, sx * 0.1, sy * 0.05, tocolor(255, 255, 255), 1, font) ButtonGlowing() -- [2. OLDAL] -- if (panel == 2) then dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.5, tocolor(50, 60, 70, 230)) -- Panel dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.05, tocolor(20, 30, 40, 255)) -- Panel fejléc dxDrawText('Animációs panel', sx * MenuPoints[1] + 200, sy * MenuPoints[2] + 15, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 85, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/crouch -- Leguggolás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 90, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 170, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/wait -- várakozás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 180, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 250, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/shake -- Várakozás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 255, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 325, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/think -- gondolkozás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 335, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1] + 175, sy * MenuPoints[2] + 425, sx * 0.1, sy * 0.05, color1 or color) dxDrawText('Következő oldal.', MenuPoints[1] + 865, sy * MenuPoints[2] + 435, sx * 0.1, sy * 0.05, tocolor(255, 255, 255), 1, font) ButtonGlowing() end if (panel == 3) then dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.5, tocolor(50, 60, 70, 230)) -- Panel dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.05, tocolor(20, 30, 40, 255)) -- Panel fejléc dxDrawText('Animációs panel', sx * MenuPoints[1] + 200, sy * MenuPoints[2] + 15, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 85, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/tired -- Lehajlás, elfáradás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 90, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 170, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/idle -- Falnak neki dőlés.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 180, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 250, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/fixcar -- autó megjavítása.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 255, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 325, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/what -- Értetlenkedés.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 335, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) ButtonGlowing() end end end end )
-
why deosn't working? addEventHandler("onClientElementColShapeHit", root, function(hitElement, matchingDimension) if hitElement == localPlayer and getElementType(source) == "vehicle" then local vehicleID = getElementModel(source) local speedX, speedY, speedZ = getElementVelocity(source) local actualSpeed = (speedX^2 + speedY^2 + speedZ^2)^(0.5) local Limit = 1 local kmh = actualSpeed * 180 outputChatBox(kmh) if not disableVehs[vehicleID] then if kmh < Limit then outputChatBox("d") end end end end )
-
How can I query the car's speed?
-
Please help me!
-
Hello! I would like to solve this so that only one person with the same skin can see this marker, but it only flashes once when it is on the skin that it shouldn't be on. function unit1() local playerskin = getElementModel(source) local x, y, z = getElementPosition(source) if (validSkin[playerskin]) then if not (status2) then status = false status3 =false statusB2 = createBlipAttachedTo(source, 0, 4, 0, 0, 255) statusMarker1 = createMarker(x, y, z, "checkpoint", 4, 255, 0, 0) destroyElement(statusMarker) destroyElement(statusB1) attachElements(statusMarker1, source) outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeressen megváltoztatad az egységed állapotát: #ffffff||Üldözés||", source, 255, 255, 255, true) status2 = true else outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Már ez az egységed állapota.", source, 255, 255, 255, true) end end end addEvent("Button2", true) addEventHandler("Button2", root, unit1) function checkSkin() local playerskin = getElementModel(source) if (validSkin[playerskin]) then setElementAlpha(statusMarker1, 255) else setElementAlpha(statusMarker1, 0) end end addEventHandler("onElementModelChange",root,checkSkin)
-
It was solved, but now the marker doesn't disappear, it just flashes
-
@Burak5312 I already solved it, but thanks.
-
This is a new code function unit1() local playerskin = getElementModel(source) local x, y, z = getElementPosition(source) if (validSkin[playerskin]) then if not (status2) then status = false status3 =false statusB2 = createBlipAttachedTo(source, 0, 4, 0, 0, 255) statusMarker1 = createMarker(x, y, z, "checkpoint", 4, 255, 0, 0) destroyElement(statusMarker) destroyElement(statusB1) attachElements(statusMarker1, source) if not (validSkin[playerskin]) then setElementAlpha(statusMarker1,0) end outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeressen megváltoztatad az egységed állapotát: #ffffff||Üldözés||", source, 255, 255, 255, true) status2 = true else outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Már ez az egységed állapota.", source, 255, 255, 255, true) end end end addEvent("Button2", true) addEventHandler("Button2", root, unit1) Please help! @Lavi
-
Can you help my whit that?
-
Yes, that's what I thought too, it's all well and good, but I wrote a system that looks at the status of the Unit and decides based on whether it can request another one, so based on the skin, I'll send you my code on how to make it disappear. function unit() local playerskin = getElementModel(source) local x, y, z = getElementPosition(source) if (validSkin[playerskin]) then if (status == false) then status2 = false status3 = false destroyElement(statusMarker1) destroyElement(statusB2) statusB1 = createBlipAttachedTo(source, 1) statusMarker = createMarker(x, y, z) attachElements(statusMarker, source) outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeressen megváltoztatad az egységed állapotát: #ffffff||Járőr||", source, 255, 255, 255, true) status = true else outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Már ez az egységed állapota.", source, 255, 255, 255, true) end end end
-
Hello! I would like to make it so that only those who are in the same skin can see a marker. Can you help?
-
@xLive Attempt call global this is a error code. I already solved it
-
Hello! I would like to make a marker move with the player as if indicating him. How should this be solved? createMarkerAttachedTo doesn't work.
-
Of course, I invited on the client side. @Burak5312