NeverUnbeatable

Members
  • Content count

    25
  • Joined

  • Last visited

Community Reputation

4 Neutral

About NeverUnbeatable

  • Rank
    Advanced Member
  1. Setspawn code for teams

    You're welcome.
  2. Setspawn code for teams

    This code is actually terrible because it gets player's account and set it's data every iteration but anyway code is fixed, I think.
  3. Setspawn code for teams

    function teamspawnset ( player, cmd ) local x, y, z = getElementPosition( player ) local dim = getElementDimension( player ) local int = getElementInterior( player ) local gang = getPlayerTeam(player) local teamName = getTeamName ( gang ) for _, plr in pairs(getPlayersInTeam(gang)) do local account = getPlayerAccount(plr) if acc then setAccountData(account, "X", x) setAccountData(account, "Y", y) setAccountData(account, "Z", z) setAccountData(account, "dim", dim) setAccountData(account, "int", int) -- spawnPlayer(plr, x, y, z) UNCOMMENT THIS TO SPAWN EVERY PLAYER ON NEW COORDS end end outputChatBox ( "Succes!", source, 0, 255, 0, true ) end addCommandHandler ("setspawn", teamspawnset) function spawnTeammates(p) local acc = getPlayerAccount(p) if acc then local x, y, z = getAccountData(acc, "X"), getAccountData(acc, "Y"), getAccountData(acc, "Z") spawnPlayer(p, x, y, z) end end addEventHandler ( "onPlayerWasted", root, function() setTimer(spawnTeammates, 5000, 1, source) end) Try this code. Didn't test it.
  4. water level problem ! help pls !!

    It's resource from community. I don't really think this script is too hard for scripters and they didn't put much effort creating it. So don't be too right and try to help him or just don't answer.
  5. Make Gui same on all Resolutions

    I use this method: local X,Y = guiGetScreenSize() local xReal = X/your screen X local yReal = Y/your screen Y -- example: local X,Y = guiGetScreenSize() local xReal = X/1366 -- my screen's X local yReal = Y/768 -- my screen's Y dxDrawText("text", xReal*683, yReal*384....) -- it will draw a text in the middle of your screen
  6. Which string function?

    Thank you!
  7. Which string function?

    I have a string "sometext*sometext". How to get "sometext" before symbol " * " and get "sometext" after this symbol?
  8. Sending color arguments to function

    Thank you but I have already solved my problem and made solution!
  9. Sending color arguments to function

    I want to use colors to send them in my function ProxDetector. But there are trg colors, idk how to define and use them. Maybe table and unpack?
  10. Sending color arguments to function

    Hello, community! Can you help me? What is the best method to send RGB/HEX colors in function? function meChat(thePlayer, cmd, ...) ProxDetector(30, thePlayer, ..., color1, color2, color3, color4, color5) end addCommandHandler("do", meChat) function ProxDetector(radius, thePlayer, ..., color1) local text = table.concat({...}," ") local oldposx, oldposy, oldposz = getElementPosition(thePlayer) for k, v in pairs(getElementsByType("player")) do local posx, posy, posz = getElementPosition(v) if getElementDimension(v) == getElementDimension(thePlayer) then local getRadius = getDistanceBetweenPoints3D(oldposx, oldposy, oldposz, posx, posy, posz) if (getRadius < radius / 16) then outputChatBox(getPlayerName(thePlayer).." "..text, v, color1, false) elseif (getRadius < radius / 8) then outputChatBox(getPlayerName(thePlayer).." "..text, v, color2, false) elseif(getRadius < radius / 4) then outputChatBox(getPlayerName(thePlayer).." "..text, v, color3, false) elseif(getRadius < radius / 2) then outputChatBox(getPlayerName(thePlayer).." "..text, v, color4, false) elseif(getRadius < radius) then outputChatBox(getPlayerName(thePlayer).." "..text, v, color5, false) end end end return true end I tried something like COLOR_PURPLE = 0xC2A2DAAA and then convert in to RGB in outputchatBox function but it says that ")" expected near "," in function string.
  11. Need help :(

    Nobody will make it for free. This forum is for helping newbies. Try to make it yourself and we will help you, fix your mistakes and etc.
  12. KatastrofaS_Dag_Reality (RACE)

    Похоже, что интересный сервер с реально гоночной атмосферой. Будет время - загляну.
  13. Mute

    setTimer(setPlayerMuted, minutes*60000, 1, target, false) setPlayerMuted has only two arguments. Look https://wiki.multitheftauto.com/wiki/SetPlayerMuted So you have to make unmute with timer yourself.
  14. Help script gate gang

    Didn't see. He gets team element from name. Sry.
  15. Help script gate gang

    function open() playerTeam = getPlayerTeam ( hitElement ) Clann = getTeamFromName ("BOPE") if (playerTeam) == Clann then moveObject(gate, 2000, 1543.4000244141, -1619.0999755859, 15.89999961853 ) end end addEventHandler ( "onColShapeHit", zona, open ) Here you compare team element "playerTeam" with string "Clann". Try this: function open() playerTeam = getPlayerTeam ( source ) playerTeamName = getTeamName(playerTeam) Clann = getTeamFromName ("BOPE") if (playerTeamName == Clann) then moveObject(gate, 2000, 1543.4000244141, -1619.0999755859, 15.89999961853 ) end end addEventHandler ( "onColShapeHit", zona, open )