-
Posts
27 -
Joined
-
Last visited
About holuzs
- Birthday 01/02/2003
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
holuzs's Achievements
Advanced Member (8/54)
4
Reputation
-
local playersVehicles = {}; function serverSpawn(selectedList1,playerxyz) local x, y, z = getElementPosition(playerxyz) local rx,ry,rz = getElementRotation(playerxyz) if (getPedOccupiedVehicle(playerxyz)) then removePedFromVehicle(playerxyz); destroyElement(getPedOccupiedVehicle(playerxyz)); end if (playersVehicles[playerxyz]) then local veh = playersVehicles[playerxyz]; if (isElement(veh)) then destroyElement(veh); end end local playerVehicle = createVehicle ( selectedList1, x+1, y+1, z+0.5, rx,ry,rz ) local playerCreatedVehicle = getPedOccupiedVehicle ( playerxyz ) warpPedIntoVehicle ( playerxyz, playerVehicle ) playersVehicles[playerxyz] = playerVehicle; end addEvent("spawncar",true) addEventHandler("spawncar",getRootElement(),serverSpawn)
-
Létrehozol egy fegyvert objectként (https://dev.prineside.com/en/gtasa_samp_model_id/tag/144-weapons/), majd createObjectPreviewnál megadod az objectet.
-
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);
-
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.)
-
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)
-
holuzs changed their profile photo
-
addEventHandler("onColShapeLeave", greenzone, greenzoneLeave)
-
[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
-
Nyelv rendszert csinálok és ahhoz kell.
-
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))
-
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)
-
Command with space characters!!! Help with team names!
holuzs replied to Razor70538's topic in Scripting
local clanName = table.concat({clanName}, " ") or clanName:gsub("_", " ") This replace underline with space. -
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
-
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
-
-- 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>
-
use fadeCamera