Jump to content

NeXuS™

Retired Staff
  • Posts

    1,134
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by NeXuS™

  1. After my testings, it seems like MTA still cant use colshape events after the colshape is attached. Just don't use attachElements and use setElementPosition instead.
  2. Are you using this on server-side?
  3. I dont know if you can attach colshapes at all. Try to use setDevelopmentMode and showcol.
  4. @raynner can you goddamn stop using my signature? Like you didn't even ask if you could use it. I made that GIF, if you want to use it, at least ASK.
  5. NeXuS™

    Help Me Please

    Add your user in the acl.xml.
  6. function spawnHandler() giveWeapon(source, 46, 500) end addEventHandler("onPlayerSpawn", getRootElement(), spawnHandler) This is the right code. He needs to give them a parachute when they spawn, not when they join.
  7. Not totally without it, as if you connect to the localhost, it doesn't have to reach out. But I suppose the connection between the hosting and the site would be acceptable.
  8. You can easily connect your MySQL to a different server.
  9. NeXuS™

    sniper aim

    Does this happen on other servers too?
  10. onPlayerWasted, getPlayerWantedLevel and setElementPosition. You'll have to create a jail system for it too. You could use setElementData and a colshape to check if he leaves the jail area.
  11. So use getElementData or getElementModel on the peds to check their skin.
  12. The only way you could do it is addDebugHook, but it may degrade script performance.
  13. local sX, sY = guiGetScreenSize() local bgW, bgH = 390, 675 -- Background item size local bgX, bgY = (sX-bgW)/2, (sY-bgH)/2 -- Background pos local lW = 160 -- Large item width local sW = 80 -- Small item width local itemTable = { "large", "large", "large", "small", "small", "small", "small" } function drawItems() dxDrawImage(bgX, bgY, bgW, bgH, "background.png") local offsetX, offsetY = 30, 30 for i = 1, #itemTable do outputChatBox("i: " .. i .. " X: " .. offsetX .. " Y: " .. offsetY) if bgW - offsetX < (itemTable[i] == "large" and lW or sW) then offsetX = 30 offsetY = offsetY + 90 end dxDrawImage(bgX+offsetX, bgY+offsetY, itemTable[i] == "large" and lW or sW, 80, itemTable[i] .. "item.png") offsetX = offsetX + (itemTable[i] == "large" and lW or sW)+10 end end addEventHandler("onClientRender", root, drawItems) Try to understand the code. If you have issues, feel free to reply.
  14. You can use getElementData to test if the ped is a zombie.
  15. onClientResourceStart is triggered at each client. So if you have 2 players online, it'll be triggered twice when started and will be triggered whenever someone joins.
  16. You'll have to use the width of the panel and two variables as X offset and Y offset, so you can easily change the rectangle's position. 1. You start your X offset and Y offset at 0. 2. You draw the first item, and then you add the width of the first item to the X offset + some pixels. 3. If you have enough space to draw the next item in the same line, you repeat step 2. 4. If you don't, you reset the X offset and add the height of the items + some pixels to the Y offset. Use a loop to draw them.
  17. Much easier way. local allowedAccountSerials = { ["1K23GKG4K12B4B4K12B4K1B4J1BK1B43"] = true, ["F2412KL4NHLK1NH41NH24KJ14K1B4144"] = true, ["FB1244HK4HK1H1H4K14H12HK4K1H4142"] = true, ["89AF8AFAW90F8A08FAW9FAF8ASF9WAF8"] = true } addEventHandler("onPlayerJoin", getRootElement(), function() local playerSerial = getPlayerSerial(source) --Get players serial if not allowedAccountSerials[playerSerial] then kickPlayer(source, "Serial " ..playerSerial.. " is not allowed to join.") --Kick them return else outputChatBox(source, "Welcome to the server "..playerSerial) end end)
  18. Yes, nrQ is the query.
  19. addEventHandler("onResourceStart", root, function() local q = dbQuery(function(nrQ) local rQ = dbPoll(nrQ, 0) for i, k in pairs(rQ) do table.insert(general, {k["first"], k["second"]}) end end, connection, "SELECT * FROM table") end) I'd never use dbPoll with -1 timeout, as it can cause freezes. dbPoll returns a table of all data, { { ["first"] = "first", ["second"] = "second" }, { ... }, { ... } } so you have to loop through it.
  20. You can execute those commands in the chat too. It doesn't matter. It seems like your ACL.xml has some bad settings. Maybe restore it to a default file.
  21. You wont decrypt it. You can use setAccountPassword to set a new password.
  22. Why would you want to decrypt the passwords?...
×
×
  • Create New...