Jump to content

itHyperoX

Members
  • Posts

    522
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by itHyperoX

  1. Thank you for your reply! One more question, if i using custom font (AwesomeFont) , is that can make any minus FPS for players ? I never knew this.
  2. Hi, i made a dx update note. Is there any way to optimize it more ? function drawPanel() latestRow = currentRow + maxRow - 1 dxDrawRectangle(panelX, panelY, mainW, mainH, tocolor(0, 0, 0, 180)) for i, v in ipairs(TextsInTable) do if i >= currentRow and i <= latestRow then i = i - currentRow + 1 local rowY = panelY + rowH + ((i - 1) * rowH) - 180 dxDrawCenterText(v[1].." "..v[2], panelX, rowY, mainW, mainH, Font) end end end addEventHandler("onClientRender", root, drawPanel) bindKey("mouse_wheel_down", "down", function() if currentRow < #TextsInTable - (maxRow - 1) then currentRow = currentRow + 1 end end) bindKey("mouse_wheel_up", "down", function() if currentRow > 1 then currentRow = currentRow - 1 end end) function dxDrawCenterText(text, startX, startY, width, height, color) dxDrawText(text, startX, startY, startX + width , startY + height, color, 1, "normal", "center", "center", false, false, false, true) end
  3. i'm 100% sure you don't know anything what u are doing. Asking help for a leaked scripts (Another topic).. Why do you have a server if you don't know :~ ?
  4. Hi, how can i get the first line, then the second line of the file, when using fileRead? local a = "EZ1" local b = "EZ2" local userJSON = fileCreate(":test/user.json") if (userJSON) then fileWrite(userJSON, a.."\n"..b); fileClose(userJSON) print("Done") end addCommandHandler("b", function() local playerJSON = fileOpen("user.json") if playerJSON then playerJSONRead = fileRead(playerJSON, 500) fileClose(playerJSON) outputChatBox(playerJSONRead) --LINE 1 outputChatBox(playerJSONRead) --LINE 2 end end)
  5. https://wiki.multitheftauto.com/wiki/OnPlayerWasted https://wiki.multitheftauto.com/wiki/SetElementData or something : count= {} count[source] and your stuff https://wiki.multitheftauto.com/wiki/GivePlayerMoney
  6. trigger it, but i don't think that's gonna work with yt link.
  7. function trig() triggerClientEvent(root, "asd123asd456", root, "asd.mp3") end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig )
  8. itHyperoX

    Hi!

    So this is not your script.
  9. Thank you, one more question. How can i make that, when the player came out of the interior, it's spawning inside the marker, and the marker instead teleporting back the player.. Any idea? addEventHandler( "onMarkerHit", teleportMarkers[k][1], function ( hitElement, matchingDimension ) setElementPosition(hitElement, outX, outY + 2, outZ) setElementDimension(hitElement, v[4]) setElementInterior(hitElement, v[5]) end) addEventHandler( "onMarkerHit", teleportMarkers[k][2], function ( hitElement, matchingDimension ) setElementPosition(hitElement, inX, inY + 2, inZ) setElementDimension(hitElement, v[9]) setElementInterior(hitElement, v[10]) end)
  10. addCommandHandler("help", function(source, commad) messageToAdmins("Player "..getPlayerName(source).." need a administrator now.") outputChatBox("Your request sent to the admins.", source) end) function messageToAdmins(message) for k, v in ipairs(getElementsByType("player")) do if isPlayerInACL(v, "Admin") or isPlayerInACL(v, "Moderator") or isPlayerInACL(v, "SuperModerator") then outputChatBox(message, v, 255, 255, 255, true) end end end function isPlayerInACL(player, acl) local accountName = getAccountName( getPlayerAccount(player) ) if accountName ~= "guest" and type( aclGetGroup(acl) ) == "userdata" then return isObjectInACLGroup( "user."..accountName, aclGetGroup(acl) ) end return false end
  11. https://wiki.multitheftauto.com/wiki/OnPlayerCommand https://wiki.multitheftauto.com/wiki/TriggerClientEvent https://wiki.multitheftauto.com/wiki/DxDrawText https://wiki.multitheftauto.com/wiki/SetTimer or https://wiki.multitheftauto.com/wiki/GetTickCount
  12. So this is something for teleporting from one position to another. The problem is the second marker doesn't do anything for some reason. local Markers = { -- outX, outY, outZ, outInt, outDim, inX, inY, inZ, inInt, inDim {--[[ From here the inside marker]] 1852.8375244141, -1752.1379394531, 13.3828125, 0, 0, --[[ From here the outside marker]] 1839.7073974609, -1745.7852783203, 13.546875, 0, 0}, -- Marker 1 [IN / OUT] {--[[ From here the inside marker]] 1825.2690429688, -1758.576171875, 13.3828125, 0, 0, --[[ From here the outside marker]] 1815.5324707031, -1769.6801757813, 13.546875, 0, 0}, -- Marker 2 [IN / OUT] }
  13. I think you can use this https://wiki.multitheftauto.com/wiki/GetSoundMetaTags
  14. Hi, in the table there is an outside positons (x y z, dim, int) and inside pos's (inx y, z, dim, int). But when player hit the second marker , nothing happen, but when player hit the first marker it's work. local Markers = { -- outX, outY, outZ, outInt, outDim, inX, inY, inZ, inInt, inDim {1852.8375244141, -1752.1379394531, 13.3828125, 0, 0, 1839.7073974609, -1745.7852783203, 13.546875, 0, 0}, {1825.2690429688, -1758.576171875, 13.3828125, 0, 0, 1815.5324707031, -1769.6801757813, 13.546875, 0, 0}, } addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() for k, v in pairs(Markers) do local outX, outY, outZ, outDim, outInt, inX, inY, inZ, inDim, inInt = v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10] insideMarker = createMarker(inX, inY, inZ, "cylinder", 1, 0, 255, 0, 180) outsideMarker = createMarker(outX, outY, outZ, "cylinder", 1, 255, 0, 0, 150) end addEventHandler( "onMarkerHit", outsideMarker, function ( hitElement, matchingDimension ) setElementPosition(hitElement, inX, inY, inZ) end) addEventHandler( "onMarkerHit", insideMarker, function ( hitElement, matchingDimension ) setElementPosition(hitElement, outX, outY + 3, outZ) end) end)
  15. Also what's the problem with this ? I don't need code, just a help! addEventHandler("onResourceStart", root, function() local result = mysql:singleQuery("SELECT * FROM markers") for k, v in pairs(result) do outputChatBox(tonumber(v["outX"]).. tonumber(v["outY"]).. tonumber(v["outZ"])) end end) Debug : attempt to concatenate a nil value
  16. Hi, how can i get the inserted id? local insert = mysql:execute("INSERT INTO lifts (outX, outY , outZ, inX, inY, inZ, Name, outInterior, outDimension, inInterior, inDimension) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", X, Y, Z, inX, inY, inZ, interiorName, currentInterior, currentDimension, interior, dimension) outputChatBox(tostring(insert.LiftID)) Debug: Boolean value.
  17. If you need help with the code feel free to ask.
  18. https://wiki.multitheftauto.com/wiki/OnPlayerDamage https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/SetTimer
  19. Someone? **EDIT** fixed by myself. playerTimer[source] = setTimer(function(source, _) outputChatBox(tostring(getPlayerName(source))) outputChatBox("player "..getPlayerName(source).." has been unmuted.", root, 255, 0, 0) setMuted(source, false) end, duration*60000, 1, source) -- FIXED HERE
  20. why you not just replacing the current clothes ?
×
×
  • Create New...