holuzs

Members
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

3 Neutral

About holuzs

  • Rank
    Advanced Member
  • Birthday 01/02/2003

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I want to get text from a page with fetchRemote. So, when a player enter a command with a code, the fetchRemote call a site with 2 GET request. How can I get a simply text from the site? function newCommand(player, cmd, code) fetchRemote('http://domain.tld/index.php?get&code='..code, function(data, error) if (error) then return print(error); end end); end addCommandHandler('cmd', newCommand);
  2. Hello! I want to remove a part from LS and LV. I use SA:MP editor, but I don't know how convert the object ids and their positions in a table. (I want to remove them with a for loop.)
  3. hosp_loc = { {-2655, 635, 14, 180}, -- San Fierro {2038, -1411, 17, 130}, --Jefferson {1173, -1323, 15, 270}, -- All Saints {1242, 327, 19, 340}, -- Red County {1609, 1816, 12, 360}, -- Las Venturas {-2200, -2311, 30, 320}, -- Angel Pine {-320, 1049, 20, 0}, --Fort Carson - Bone County {-1514.5, 2524, 56, 0} --Tierra Robada } function Respawn() local randPosition = math.random(1, #hosp_loc) local skinid = getElementModel(source) outputChatBox("You respawn in 10 second!", source, 255, 255, 255, true) setTimer(function() spawnPlayer(source, hosp_loc[randPosition][1], hosp_loc[randPosition][2], hosp_loc[randPosition][3], hosp_loc[randPosition][4], skinid, 0, 0) end, 10000, 1) end addEventHandler("onPlayerWasted", root, Respawn)
  4. addEventHandler("onColShapeLeave", greenzone, greenzoneLeave)
  5. holuzs

    Multi Language

    [EN] Hi, I want to make a multi language survival server, but I don't know how much lag cause the exporting. It would be a problem with exporting? [HU] Cső, szeretnék csinálni egy több nyelvű túlélő szervert, de nem tudom mennyi laggot okozna a folyamatos export. Mennyi laggot okozna ha mindenhova exportálnám? Example/Példa: texts = { ["hu"] = { --<[ DXhez használt szövegek ]>-- ["ban.user"] = "Felhasználóneved", ["ban.admin"] = "Admin", ["ban.serial"] = "Serialod", ["ban.reason"] = "Ban indok", ["ban.date"] = "Ban időpontja", ["ban.expire"] = "Ban lejár", --<[ Chathez használt szövegek ]>-- }, ["en"] = { --<[ DXhez használt szövegek ]>-- ["ban.user"] = "Username", ["ban.admin"] = "Admin", ["ban.serial"] = "Serial", ["ban.reason"] = "Ban reason", ["ban.date"] = "Ban date", ["ban.expire"] = "Expire date", --<[ Chathez használt szövegek ]>-- }, ["de"] = { } ["ro"] = { } } function getText(player, neededText) return texts[getElementData(player, "player->language")][neededText] or "Unknown text" end
  6. holuzs

    Word replacer

    Nyelv rendszert csinálok és ahhoz kell.
  7. holuzs

    Word replacer

    ENG: So, I try to make a word replacer script, but when I want to replace 2 or more word in a sentence didn't work. Someone can help me in this? HUN: Szóval, megpróbáltam csinálni egy "szó helyettesítő scriptet", de ha 2 vagy több szót akarok helyettesíteni, nem működik. Valaki tudna segíteni? An example/Egy példa: outputChatBox(exports["resourcename"]:replaceWords("%PLAYERNAME% has %PLAYERMONEY% dollar!", "%PLAYERNAME%", getPlayerName(player), "%PLAYERMONEY%", getPlayerMoney(player))
  8. holuzs

    Warp player to

    function getAllPlayer(player, cmd) local mx, my, mz = getElementPosition(player) for i,v in ipairs(getElementsByType("player")) do local rand = math.random(1, 5) setElementPosition(v, mx+rand, my+rand, mz) end end addCommandHandler("getallplayer", getAllPlayer)
  9. local clanName = table.concat({clanName}, " ") or clanName:gsub("_", " ") This replace underline with space.
  10. Hello! [ENG] I want to make a sms paying script. So, when I send a text to a mobile number, the sms aggregator open(/trigger) my php code. When the php code opened, I want to approve the buying, and give the premium points to player immediately on the server. (Sorry for my bad english skills. xd) Hali! [HUN] Szeretnék csinálni egy EDSMS jóváírós scriptet, viszont fogalmam sincs hogyan kéne a php kódot úgy megcsinálni, hogy az MTA-n megírt scriptet meghívja. Ugye MTAra az account idjét (amit megadott a prefix után) illetve a jóváírandó összeget szeretném átvinni. (Azt már sikerült megoldanom hogy phpmyadminba jóváírja, de akkor reconnect kell hogy megkapja.) AggregatorAggregator
  11. holuzs

    MultiLanguage

    sendMessage(target player, "English text", "Russian text") function sendMessage(writeTo, enText, ruText) if getElementData(writeTo, "language")=="english" then outputChatBox(enText, writeTo, 255, 255, 255, true) elseif getElementData(writeTo, "language")=="russian" then outputChatBox(ruText, writeTo, 255, 255, 255, true) end end
  12. holuzs

    Paramedic Command

    -- Copy to 'server.lua' function healPlayer(player, cmd, name, price) if not name or not price then outputChatBox("/heal [Player_Name] [Price]", player, 255, 255, 255, true) else local target = getPlayerFromName(name) if target then if getPlayerMoney(target)>=tonumber(price) then takePlayerMoney(target, tonumber(price)) givePlayerMoney(player, tonumber(price)) setElementHealth(target, 100) outputChatBox(getPlayerName(player) .. " healed you!", player, 255, 255, 255, true) outputChatBox("You healed " .. getPlayerName(target), player, 255, 255, 255, true) else outputChatBox("Can't pay the healing", player, 255, 255, 255, true) end else outputChatBox("I can't find the target!", player, 255, 255, 255, true) end end addCommandHandler("heal", healPlayer) -- Copy to 'meta.xml' <meta> <script src="server.lua" type="server"/> </meta>
  13. Hello. I started make a movable and a scalable interface. The moving is working, but the scaling not. local cursorX, cursorY = getCursorPosition(); cursorX = cursorX * x; cursorY = cursorY * y; if cursorX<=hpDefX+hpDefSX-12 and cursorX>=hpDefX+hpDefSX and cursorY<=hpDefY+hpDefSY-12 and cursorY>=hpDefY+hpDefSY then print("Sizeing") else hpDefX = cursorX - moveHPX; hpDefY = cursorY - moveHPY; end (hpDefX & hpDefY = bar position) (hpDefSX & hpDefSY = bar size)
  14. function pickedUpTheHiker() local veh = getPedOccupiedVehicle(localPlayer) setPedAnimation(hiker) setPedControlState(hiker, "enter_passenger", true) end The ped stop the anim, but don't in into the nearest vehicle.