Jump to content

Search the Community

Showing results for tags 'help'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. I want to do this: Using webhook, something like this: -- created by zsenel local discordWebhookURL = "https://discord.com/api/webhooks/835103134270488596/FY5*********EXAMPLE************yKEaRsKJp4" function sendDiscordMessage(message) sendOptions = { formFields = { content = "Example:", username = "webhook - Example", embed = { description= "```Some user have typed \"help\" command.```", color= null, author= { name= "Webhook - Example" }, footer = { text = "I want to do this..." }, }, }, } fetchRemote ( discordWebhookURL, sendOptions, WebhookCallback ) end function WebhookCallback(responseData) outputDebugString("(Discord webhook callback): responseData: "..responseData) end function SendDiscordTestMessage(player, command, ...) local msg = table.concat({...}," ") -- for multiple words sendDiscordMessage(msg) end Return < Thats only a example do i want to do, any kind of help please?
  2. When i try to join a specific server, I get this message External HTTP file mismatch (Retrying this file with internal HTTP) [destiny_animations\shared\animations.lua] I already tried redownloading MTA, GTA SA, did everything and cant solve it please help me.
  3. local gate = createObject(980, 1001.5, -1096.9000244141, 25.60000038147, 0, 0, 110) local marker = createMarker(1001.5, -1096.9000244141, 25.60000038147, "cylinder", 8, 0, 0, 0, 0) function moveGate(thePlayer) if isObjectInACLGroup("user." .. nomeAcc, aclGetGroup("TDF")) then moveObject(gate, 3000, 1001.5, -1096.9000244141, 20) end end addEventHandler("onMarkerHit", marker, moveGate) function move_back_gate() moveObject(gate, 3000, 1001.5, -1096.9000244141, 25.60000038147) end addEventHandler("onMarkerLeave", marker, move_back_gate) I think its all ok with this code, but... ERROR. I wrongly have deleted a wrong line on my code, thats all ok now guys, i think. local nomeAcc = getAccountName (getPlayerAccount (source))
  4. hey, i have added a login panel in my server, it has been loaded successfully but its not showing when i enter into my server. Whiee???
  5. testdoor = createObject(1499, 1580.03149, -1631.73987, 13.38281) bindKey(source, "e", "down", function() local currentFreezeStatus = isElementFrozen ( testdoor ) if currentFreezeStatus then setElementFrozen ( testdoor, not currentFreezeStatus ) outputChatBox("You have closed the door!",255,255,255) else setElementFrozen ( testdoor, currentFreezeStatus ) outputChatBox("You have opened the door!",255,255,255) end end) its showing an error bad argument @ 'bindkey' [expected player argument 1, but nil]
  6. Mas não consigo, algo da errado no 'isElementInRange', alguém poderia me ajudar? addCommandHandler("car", function(thePlayer,veh) local x, y, z = getElementPosition (thePlayer) local veh = getElementsByType('vehicle') if isElementInRange(veh, x, y, z, 25) then outputChatBox("teste",thePlayer,255,255,255,true) end end end ) Print do erro: https://prnt.sc/12bhy03
  7. function isPlayerBanned(player) if (player) then local serial = getPlayerSerial(player); local qh = dbQuery(con, "SELECT * FROM bans WHERE serial=? AND expiration > CURRENT_TIME()", serial); local bans = dbPoll(qh, 500); if (bans) then if (#bans > 0) then return true; else return false; end else return false; end else return false; end end The script always gives me true, even if i replace that one true with false
  8. My screen keeps flickering when I open MTA, need help! It looks like : https://drive.google.com/file/d/1xXdVZdnM61QJTW_hzrmMf9iq2SA8G-1x/view?usp=sharing
  9. Hi guys, hope you are all good. I am scripting a pretty simple server based on the "play" gamemode, with a couple of mods and i would like to add some bots around the map (plus event/mission like on Arma/Dayz servers). I was scripting around using slothbot and i saw that sometimes the bots are invincible but i didn't give much importance to that because i had to clean my code. Then, i noticed that every bot was invincible. Thinking of a bug in my code, i removed my mods and tryied to create a ped using createPed but they are still invincible. I noted that the only way to kill them is using the knife (stealthkill). To develop the scripts i use a Windows PC meanwhile i have a "production" server based on Linux and it seems that bots get killed (sometimes) on the server. I also checked around and i aw a similar post but wasn't helpful. Other thing to note is that i do not manipulate health on any gameobject. Steps i tried to fix the bug: - reinstalling MTA - removing all teams from players/bots - deleting all server resources with a MTA clean install, creating only a simple resource to spawn a ped local weaponIds = {10, 22, 33} local started = false function initBotOnStreets(theResource) if(getResourceName(theResource) ~= "5bserver" or started) then return end outputDebugString("Spawno") createPed(136, 2320, -1737, 0) end addEventHandler ( "onResourceStart", getRootElement(), initBotOnStreets) - tried to play GTA and see if i could kill npcs This is my script (using slothbot) local skinIds = {136} local weaponIds = { 22, 33} local botTeams = { createTeam("bots1"), createTeam("bots2"), createTeam("bots3") } local locations = { { name = "nearGroveSt", x = 2313, y = -1737, z = 2, botNumer = 5 }, { name = "nearGroveSt1", x = 2320, y = -1737, z = 0, botNumer = 5 }, { name = "nearGroveSt2", x = 2313, y = -1757, z = 0, botNumer = 5 }, { name = "nearGroveSt3", x = 2323, y = -1747, z = 0, botNumer = 5 } } local knownBots = {} local started = false function initBotOnStreets(theResource) if(getResourceName(theResource) ~= "bot-killers" or started) then return end started = true -- createPed(136, 2320, -1737, 0) for key, location in pairs(locations) do for i = 0, location["botNumer"] do local posX = math.random(location["x"] - 20, location["x"] + 20) local posY = math.random(location["y"] - 20, location["y"] + 20) local skinId = skinIds[ math.random( #skinIds ) ] local weaponId = weaponIds[ math.random( #weaponIds ) ] -- local theTeam = botTeams[ math.random( #botTeams ) ] local theTeam = nil local bot = exports.Slothbot:spawnBot(posX, posY, location["z"], 0, skinId, 0, 0, theTeam, weaponId, "hunting", nil) local id = location["name"].."_"..tostring(i) setElementData(bot, "id", id) setElementData(bot, "pascLocName", location["name"]) -- setElementData(bot, "slothbot", true) table.insert(knownBots, {id}) end end end function respawnStreetBot() local id = getElementData(source, "id") if(isValueInTable(knownBots, id, 1)) then local locationName = getElementData(source, "pascLocName") for key, location in pairs(locations) do if(locationName == location["name"]) then outputDebugString("Respawning "..id) local posX = math.random(location["x"] - 50, location["x"] + 50) local posY = math.random(location["y"] - 50, location["y"] + 50) local skinId = skinIds[ math.random( #skinIds ) ] local weaponId = weaponIds[ math.random( #weaponIds ) ] local theTeam = botTeams[ math.random( #botTeams ) ] local bot = exports.Slothbot:spawnBot(posX, posY, location["z"], 0, skinId, 0, 0, theTeam, weaponId, "hunting", nil) setElementData(bot, "id", id) setElementData(bot, "pascLocName", location["name"]) end end end end addEventHandler ( "onResourceStart", getRootElement(), initBotOnStreets) addEvent("onBotWasted", true) addEventHandler ( "onBotWasted", getRootElement(), respawnStreetBot ) The gamemode script (pretty much the play gamemode with two or three lines changed): local vehiclesToSpawn = {} local spawnpoints = { {-711,957,12.4,90}, {2005,1543,13.5,270}, {2485,-1667,13.3,0}, {-2405,-598,132.6,128}, } local vehicleDestroyTimers = {} local validSkins = {0, 1, 2, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312} local _validSkins = {102,284,249} local playerVehicles = {} local playersTeam = createTeam("Camerati"); local function spawn(player) if player and isElement(player) then local x,y,z,r = unpack(spawnpoints[math.random(1,#spawnpoints)]) --spawnPlayer(player,x+math.random(-3,3),y+math.random(-3,3),z,r,validSkins[math.random(1,#validSkins)],0,0) spawnPlayer(player,2485+(math.random(-10,10)),-1667+(math.random(-10,10)),13.3,0+(math.random(-10,10)),_validSkins[math.random(1,#_validSkins)] ,0,0) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) giveWeapon ( player, 10, 200, true ) -- Gives dildo giveWeapon ( player, 31, 200, true ) -- Gives m4 giveWeapon ( player, 22, 200, true ) -- Gives m9 -- setPlayerTeam(player, playersTeam) end end local function onJoin() spawn(source) local accName = getAccountName ( getPlayerAccount ( source ) ) -- get his account name if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("E' entrato un CaMEMErata "..getPlayerName(source)) end end local function onWasted() local t = tonumber(get("playerRespawnTime")) or 5000 setTimer(spawn,(t > 50 and t or 50),1,source) end local function destroyPlayerVehicles() local vehicles = playerVehicles[source] for _,vehicle in ipairs(vehicles) do if isElement(vehicle) then destroyElement(vehicle) end end playerVehicles[source] = nil end local function onEnter(player) local t = tonumber(get("vehicleRespawnTime")) or 60000 source.damageProof = false source.frozen = false local vehicledata = vehiclesToSpawn[source] setTimer(createNewVehicle,(t > 50 and t or 50),1,vehicledata) vehiclesToSpawn[source] = nil if not playerVehicles[player] then playerVehicles[player] = {} addEventHandler("onPlayerQuit",player,destroyPlayerVehicles) end table.insert(playerVehicles[player],source) removeEventHandler("onVehicleEnter",source,onEnter) end local function destroyVehicle(vehicle) if vehicle and isElement(vehicle) and getElementType(vehicle) == "vehicle" then destroyElement(vehicle) end end local function destroyTimer() if vehicleDestroyTimers[source] and isTimer(vehicleDestroyTimers[source]) then killTimer(vehicleDestroyTimers[source]) end removeEventHandler("onVehicleEnter",source,destroyTimer) end local function onExit() local t = tonumber(get("vehicleExpireTime")) or 600000 vehicleDestroyTimers[source] = setTimer(destroyVehicle,(t > 50 and t or 50),1,source) addEventHandler("onVehicleEnter",source,destroyTimer) end function createNewVehicle(vehicledata) local m,x,y,z,r = unpack(vehicledata) local vehicle = Vehicle(m,x,y,z,0,0,r) vehicle.damageProof = true vehicle.frozen = true vehiclesToSpawn[vehicle] = vehicledata addEventHandler("onVehicleEnter",vehicle,onEnter) addEventHandler("onVehicleExit",vehicle,onExit) end local function initScript() resetMapInfo() local players = getElementsByType("player") for _,player in ipairs(players) do spawn(player) end for _,vehicledata in ipairs(vehiclesToSpawn) do createNewVehicle(vehicledata) end addEventHandler("onPlayerJoin",root,onJoin) addEventHandler("onPlayerWasted",root,onWasted) end addEventHandler("onResourceStart",resourceRoot,initScript) Does anyone have any idea about this? I have lost around 10h behind this without any success...
  10. I tested the Unlimited-Vehicle-Master: https://github.com/alexaxel705/Unlimited-Vehicle/blob/master/server.lua Even though the author makes the Vehicle Type and the Handling of 411 for all cars. But the car might be made with a S.W.A.T wheel size. So the car looks like floating on the ground. Could anyone be able to change the wheel size if I spawn a car?
  11. Доброго времени суток. Данная тема только для умельцев заниматься скриптингом. Очень понравился вот этот данный спидометр:(смотреть с 1:25) - https://www.youtube.com/watch?v=gjw-sCkDBog Но, у меня не хватает навыка создать подобный спидометр. Хотел бы попросить умельцев помочь реализовать данный спидометр. (с) Спасибо.
  12. A kérdés a következő lenne, hogy birnék az accountData-ba a játékos által beírt szöveget megadni. Benne van a scriptben amit Worthless is csinált (direkt letöltöttem és bemásoltam azt a részt), de úgy sem jó. local sx, sy = guiGetScreenSize(); local relX, relY = sx/1680, sy/1050; local isPanelVisible = true; local panelState = "1"; -- 1 = Bejelentkezés, 2 = Regisztráció, 3 = Karakter létrehozás showCursor(true); setPlayerHudComponentVisible("all", false); showChat(true); local panelPosition = {0.79, 0.25}; local buttonColors = { [1] = tocolor(210, 155, 65, 150); [2] = tocolor(207, 83, 52, 150); }; local headerText = ""; local accountData = { -- Beviteli mezők tartalma [1] = { -- Bejelentkezés [1] = "", -- Felhasználónév [2] = "", -- Jelszó }, [2] = { -- Regisztráció [1] = "", -- Felhasználónév [2] = "", -- Jelszó [3] = "", -- E-Mail }, }; local dataPointer = false; addEventHandler("onClientRender", root, function() dxDrawRectangle( sx*panelPosition[1], sy*panelPosition[2], relX*300, relY*500, tocolor( 0, 0, 0, 150 ) ); dxDrawRectangle( sx*panelPosition[1], sy*panelPosition[2], relX*5, relY*500, tocolor( 210, 155, 65, 255 ) ); dxDrawText("ViolantGaming", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.005), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.05), tocolor( 210, 155, 65, 255 ), relX*2, relY*2, "default-bold", "center"); dxDrawText(headerText, sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.03), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.6), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); -- Login felület if (panelState == "1") then headerText = "Bejelentkezés"; -- Felhasználónév dxDrawText("Felhasználónév", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.075), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); --dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.2), relX*275, relY*50, tocolor( 255, 255, 255, 255)); dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.1), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); -- // Felső mező \\ -- if (panelState == "1") then -- Bejelentkező ablak if (dataPointer == 1) then -- Mező kijelölve dxDrawText(accountData[1][1].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9),tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else text = string.rep("*", string.len(accountData[2][2])); dxDrawText(accountData[1][1], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.2), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); dxDrawText("Jelszó", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.175), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); -- // Bejelentkezés : Jelszó \\ -- if (panelState == "1") then -- Regisztrációs ablak local text; if (dataPointer == 2) then -- Mező kijelölve text = string.rep("*", string.len(accountData[1][2])); dxDrawText(accountData[1][2].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.21), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else dxDrawText(accountData[1][2], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.21), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.34), relX*275, relY*50, buttonColors[1]); -- Bejelentkező gomb dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.40), relX*275, relY*50, buttonColors[2]); -- Regisztrációs gomb dxDrawText("Bejelentkezés", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.35), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); dxDrawText("Regisztráció", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.41), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); elseif (panelState == "2") then headerText = "Regisztráció"; -- Felhasználónév dxDrawText("Felhasználónév", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.075), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.1), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); -- // Felhasználónév : Regisztráció \\ -- if (panelState == "2") then -- Regisztrációs ablak if (dataPointer == 1) then -- Mező kijelölve dxDrawText(accountData[2][1].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else dxDrawText(accountData[2][1], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.11), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end -- // Regisztrációs ablak : Jelszó \\ -- dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.18), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); dxDrawText("Jelszó", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.16), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); if (panelState == "2") then -- Regisztrációs ablak local text; if (dataPointer == 2) then -- Mező kijelölve text = string.rep("*", string.len(accountData[2][2])); dxDrawText(text.."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.19), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else text = string.rep("*", string.len(accountData[2][2])); dxDrawText(text, sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.19), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.26), relX*275, relY*50, tocolor( 95, 95, 95, 150 ) ); dxDrawText("E-Mail", sx*(panelPosition[1]+0.08), sy*(panelPosition[2]+0.24), sx*(panelPosition[1]+0.1), sy*(panelPosition[2]+0.07), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); if (panelState == "2") then -- Regisztrációs ablak if (dataPointer == 3) then -- Mező kijelölve dxDrawText(accountData[2][3].."|", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.27), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); else if (accountData == "") then else dxDrawText(accountData[2][3], sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.27), sx*(panelPosition[1]+0.17), sy*(panelPosition[2]+0.9), tocolor( 255, 255, 255, 255 ), relX*1.5, relY*1.5, "default-bold", "center"); end end end dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.34), relX*275, relY*50, buttonColors[1]); -- Regisztrációs gomb dxDrawRectangle( sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.40), relX*275, relY*50, buttonColors[2]); -- Vissza gomb dxDrawText("Regisztráció", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.35), sx*(panelPosition[1]+0.175), sy*(panelPosition[2]+0.34), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); dxDrawText("Visszalépés", sx*(panelPosition[1]+0.01), sy*(panelPosition[2]+0.41), sx*(panelPosition[1]+0.175), sy*(panelPosition[2]+0.34), tocolor( 255, 255, 255, 255 ), relX*2, relY*2, "default-bold", "center"); end end); addEventHandler("onClientCursorMove", root, function (cX, cY) if (isPanelVisible) then if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.34) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.39) ) then -- Gombon van a kurzor buttonColors[1] = tocolor(210, 155, 65, 255); else -- Nincs a gombon a kurzor buttonColors[1] = tocolor(210, 155, 65, 150); end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.40) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.45) ) then -- Gombon van a kurzor buttonColors[2] = tocolor(207, 83, 52, 255); else -- Nincs a gombon a kurzor buttonColors[2] = tocolor(207, 83, 52, 150); end end end); addEventHandler("onClientClick", root, function(button, state) if (isPanelVisible) then local cX, cY = getCursorPosition(); if ( ( button == "left" ) and ( state == "down" ) ) then if (panelState == "1") then if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.1) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.15) ) then dataPointer = 1; end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.2) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.25) ) then dataPointer = 2; end elseif (panelState == "2") then if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.1) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.15) ) then dataPointer = 1; end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.16) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.22) ) then dataPointer = 2; end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.27) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.31) ) then dataPointer = 3; end end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.34) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.39) ) then if ( panelState == "1" ) then execLogin(); elseif ( panelState == "2" ) then execRegister(); end end if ( (cX >= panelPosition[1]+0.01) and (cY >= panelPosition[2]+0.40) and (cX <= panelPosition[1]+0.175) and (cY <= panelPosition[2]+0.45) ) then if ( panelState == "1" ) then panelState = "2"; elseif ( panelState == "2" ) then panelState = "1"; end end end end end ); addEventHandler("onClientCharacter", resourceRoot, function(char) if (isPanelVisible == true) then if (dataPointer > 0) then accountData[panelState][dataPointer] = accountData[panelState][dataPointer][char] end end end ); function execLogin() outputChatBox("Bejelentkező gomb működik!"); end function execRegister() outputChatBox("Regisztrációs gomb működik!"); end
  13. Hey Please Hlp When I'm trying to start the Server It says me to update Mandatory, after update complete It says that to install update, then i click on OK button it closes the game and then extract the downloaded files after extraction, then it stucks and the game is not opening and not responding WHAT I DO PLZ HLP!
  14. -- Ez a server oldali script local rigPrice = 50000; function buyMiningRig(player, amount) local money = getPlayerMoney(localPlayer); if (money >= rigPrice) then money - rigPrice outputChatBox("#ffffff[Bitcoin] Sikeresen vettél egy bányászgépet!", 0, 0, 0, true); end end addCommandHandler("buyminingrig", root, buyMiningRig); -- Ez pedig a kliens oldali local maxMiningRigs = 50; local btcPrice = 1500000; local minerToggle = false; local playerBtc = 0; local miningRigs = 0; function mineBtc(howMuch) playerBtc + howMuch; if (minerToggle) then setTimer(mineBtc, 1000, 1, 0.00001); end end function displayBtc() outputChatBox("[Bitcoin] A jelenlegi bitcoinjaid száma:"..playerBtc.. ", és értéke :" ..btcprice/playerBtc); end addCommandHandler("btcamount", root, displayBtc) function toggleMinerOn() if (minerToggle == false) then minerToggle = true; outputChatBox("[Bitcoin] A bányászgép bekapcsolva!"); mineBtc(); elseif (minerToggle == true) then minerToggle = false; outputChatBox("[Bitcoin] A bányászgép kikapcsolva!"); end end addCommandHandler("togglebtc", root, toggleMiner); (A két script ugyan abba a meta-ba van beleírva!) A lényeg annyi lenne, hogy a szerver oldali scriptből hogy tudnék hozzáadni a "miningRigs" változóhoz egy adott mennyiséget. Ha valaki tudna ebbe segíteni, azt megköszönném, legyen bármilyen hosszú a script csak jó legyen.
  15. locais screenW , screenH = guiGetScreenSize () local exibir_painel = função falsa PainelDX () dxDrawLine (( telaW * 0,3807 ) - 1 , ( telaH * 0,1615 ) - 1 , ( telaW * 0,3807 ) - 1 , telaH * 0,7734 , tocolor ( 237 , 0 , 0 , 245 ), 1 , false ) dxDrawLine ( telaW * 0,6208 , ( telaH * 0,1615 ) - 1 , ( telaW * 0,3807 ) - 1 , ( telaH * 0,1615 ) - 1 , tocolor ( 237 , 0 , 0 , 245 ), 1 , falso ) dxDrawLine (( telaW * 0,3807 ) - 1 , tela H * 0,7734 , telaW * 0,6208 , telaH * 0,7734 , tocolor ( 237 , 0 , 0 , 245 ), 1 , falso ) dxDrawLine ( telaW * 0,6208 , telaH * 0,7734 , telaW * 0,6208 , ( telaH * 0,1615 ) - 1 , tocolor ( 237 , 0 , 0 , 245 ), 1 , falso ) dxDrawRectangle ( telaW * 0,3807 , telaH * 0,1615 , telaW * 0,2401 , telaH * 0,6120 , tocolor ( 3 , 0 , 0 , 153 ), falso ) dxDrawImage ( telaW * 0,4290 , telaH * 0,2227 , screenW * 0,1435 , screenH * 0.2747 , ": guieditor / images / examples / LavarMoney.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false ) dxDrawText ( "Lavagem de Dinheiro" , screenW * 0.4305 , screenH * 0,1693 , tela W * 0,5652 , tela H * 0,2005 , tocolor ( 255 , 255 , 255 , 255 ), 0,70 , "bankgothic" , "center" , "center" , false , false , false , false , false ) dxDrawText ( "O dinheiro sujo pode ser lavado 100 mil por PenDrive com Trojan" , screenW * 0,4173 , tela H * 0,5117 , tela W * 0,5798 , tela H * 0,5638 , tocolor ( 255 , 255 , 255 , 255 ), 0,50 , "bankgothic" , "center" , "center" , false , true , false , false , false ) dxDrawLine (( screenW * 0.4239 ) - 1 , ( screenH * 0.6237 ) - 1 , ( telaW * 0,4239 ) - 1 , telaH * 0,7018 , tocolor ( 255 , 3 , 3 , 254 ), 1 , falso ) dxDrawLine ( telaW * 0,5798 , ( telaH * 0,6237 ) - 1 , ( telaW * 0,4239 ) - 1 , ( telaH * 0,6237 ) - 1 , tocolor ( 255 , 3 , 3 , 254 ), 1 , falso ) dxDrawLine (( telaW * 0,4239 ) - 1 , telaH * 0,7018 , telaW * 0,5798 , telaH * 0,7018 , tocolor ( 255 , 3 , 3 , 254 ), 1 , falso ) dxDrawLine ( telaW * 0,5798 , telaH * 0,7018 , screenW * 0.5798, (screenH * 0.6237) - 1, tocolor(255, 3, 3, 254), 1, false) dxDrawRectangle(screenW * 0.4239, screenH * 0.6237, screenW * 0.1559, screenH * 0.0781, tocolor(11, 0, 0, 203), false) dxDrawText("Lavar", screenW * 0.4231, screenH * 0.6237, screenW * 0.5798, screenH * 0.7018, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawLine((screenW * 0.6040) - 1, (screenH * 0.1693) - 1, (screenW * 0.6040) - 1, screenH * 0.1953, tocolor(240, 254, 3, 254), 1, false) dxDrawLine(screenW * 0.6179, (screenH * 0.1693) - 1, (screenW * 0.6040) - 1, (screenH * 0.1693) - 1, tocolor(240, 254, 3, 254), 1, false) dxDrawLine((screenW * 0.6040) - 1, screenH * 0.1953, screenW * 0.6179, screenH * 0.1953, tocolor(240, 254, 3, 254), 1, false) dxDrawLine(screenW * 0.6179, screenH * 0.1953, screenW * 0.6179, (screenH * 0.1693) - 1, tocolor(240, 254, 3, 254), 1, false) dxDrawRectangle(screenW * 0.6040, screenH * 0.1693, screenW * 0.0139, screenH * 0.0260, tocolor(0, 0, 0, 131), false) dxDrawText("X", screenW * 0.6032, screenH * 0.1693, screenW * 0.6179, screenH * 0.1953, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "center", "center", false, false, false, false, false) end addEvent("Exibir_Painel_Ao_Hitar_O_Marker", true) addEventHandler("Exibir_Painel_Ao_Hitar_O_Marker", root, function() if exibir_painel == false then addEventHandler("onClientRender", getRootElement(), PainelDX) exibir_painel = true showCursor(true) else RemoveEventHandler("onClientRender", getRootElement(), PainelDX) exibir_painel = false showCursor(false) end end) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end -- Modified version for DX Text function isCursorOverText(posX, posY, sizeX, sizeY) if ( not isCursorShowing( ) ) then return false end local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) return ( (cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) ) end addEventHandler("onClientClick", getRootElement(), function(button, state) if button == "left" and state == "down" then if exibir_painel == true then if isMouseInPosition(screenW * 0.6040, screenH * 0.1693, screenW * 0.0139, screenH * 0.0260) then removeEventHandler("onClientRender", getRootElement(), PainelDX) exibir_painel = false showCursor(false) end end end end) local Sujo = getElementData(source, "moneysujo") or 0 addEventHandler("onClientClick", getRootElement(), function(button, state) if button == "left" and state == "down" then if exibir_painel == true then if isMouseInPosition(screenW * 0.4239, screenH * 0.6237, screenW * 0.1559, screenH * 0.0781) then if Sujo >= 100000 and "PenDrive Com Trojan" then setElementData(source, "moneysujo", -100000) givePlayerMoney(source, givePlayerMoney(source)+100000) end end end end end) Estou fazendo um script com Painel DX e estou tendo problema na parte de limpar o dinheiro pois não está funcionando eu clicko no botão de "Lavar" e não tira os 100k de dinheiro sujo para virar 100k limpo além disso para conseguir fazer essa lavagem com o dinheiro precisa está com um PenDrive com Trojan para cada lavagem de dinheiro, ou seja, cada pendrive lava 100k alguem pode me ajudar Imagem do painel: https://uploaddeimagens.com.br/imagens/NXxdneg
  16. could someone help me? I start the MTA, it loads more, the screen does not appear, I have reinstalled it too and it did not work, what can it be? https://pastebin.mtasa.com/455823672 I don't know if that can help I followed that step too https://upload.mtasa.com/u/846096373/Logfile.PML_ it doesn't show any error screens either, I've used malwerebytes, I've reinstalled C ++ and nothing, I can't even play GTA SA I click to start and it won't open, I downloaded the original rockstar games launcher, I've also tried with others from internet and does not work https://imgur.com/a/JpKHSnN I don't know if that can help because it's in Portuguese too, I pulled the PC log on the error my nick in Discord Ismael cu de barro#9414 after this screen nothing happens anymore https://imgur.com/ZBy8WUd
  17. Hello guys, I am hoping someone here can help me to do imposible task. I need vehicle doors to stay open after I enter vehicle. How to do it? Does somebody knows? Thank you very much!
  18. Hello Everyone, Can someone know about how to detect auto keypresses in mtasa, can we kick or something the person who user auto key presser automatically. Hope you give some solution for it.. Thank you.
  19. Boa noite, Estou fazendo um sistema de bot que atira na direção do player, esta funcionando tudo certo. Mais ele esta atirando muito para cima, na mesma direção mas, só que para cima, vou enviar uma print mostrando. Qual função posso usar para abaixar o tiro do ped https://ibb.co/s3BMdDX
  20. I want to create a system that could load another player
  21. There's a server named FineMTA and I can not connect to it, but can to other servers. I tried to reinstall MTA, with original and cracked GTA:SA, but it's the same problem. My friend sent me his mods files but nothing changed. We talked with the admins and developers of the server but they had no idea what is the problem. Here is a picture of it: https://imgur.com/a/TJEikVU And here is an MTA diagnostic about my client, but I don't think it's the problem: https://pastebin.mtasa.com/506877440
  22. alguém sabe me dizer se tem alguma função que faça o player n correr, e sim ficar só no trote normal
  23. So i tried to make a script which on client click on gui creates 4 markers randomly selected and to those 4 markers i attached a blip which is deleted with marker on markerhit but the problem i'm having is when the client leaves the vehcile it should destroy all markers and blips attached to it but it only destroys markers and 1 blip. I know my code is messy i'm learning tho ;/ Looking forward for any feedback ;/ Miejsca = { {-2374.76,848.06,40.26}, {-2411.90,917.68,45.58}, {-2503.44,918.54,64.94}, {-2502.92,899.47,64.90}, } Miejsca2 = { {-2175.37,-42.62,35.31}, {-2078.89,-1.16,35.32}, {-2027.23,-51.83,35.37}, {-2158.88,-6.57,35.32}, } Miejsca3 = { {-2509.17,-109.50,25.62}, {-2514.50,-190.11,25.15}, {-2540.79,-144.05,15.88}, {-2576.06,-142.61,6.54}, } Miejsca4 = { {-1929.75,1189.20,45.45}, {-1956.40,1189.02,45.45}, {-2053.97,1193.66,45.46}, {-2065.96,1161.57,46.66}, } Miejsca5 = { {-2575.85,1148.27,55.73}, {-2534.61,1141.51,55.73}, {-2479.18,1141.16,55.73}, {-2451.32,1139.70,55.73}, } Miejsca6 = { {-2880.85,737.10,29.49}, {-2863.24,682.77,23.44}, {-2877.86,797.28,35.74}, {-2837.11,877.44,44.06}, } miejscaa = 0 function Rozwoz(plr) if plr == localPlayer then miejscaa = math.random(1,6) if miejscaa == 1 then Miejsca = Miejsca elseif miejscaa == 2 then Miejsca = Miejsca2 elseif miejscaa == 3 then Miejsca = Miejsca3 elseif miejscaa == 4 then Miejsca = Miejsca4 elseif miejscaa == 5 then Miejsca = Miejsca5 elseif miejscaa == 6 then Miejsca = Miejsca6 end end StartPracaa(plr) end punktyp = 0 maxpunktyp = 4 markerdelete = createElement("markerusune") function StartPracaa(plr) if plr == localPlayer then for _,v in ipairs(Miejsca) do local blipGroupElement = createElement("blipGroupElement") markerPizzaStart = createMarker(v[1],v[2],v[3],"cylinder",3.0,255,255,255) blipPizzaStart = createBlipAttachedTo(markerPizzaStart,12) setElementParent(blipPizzaStart, blipGroupElement) setElementParent(markerPizzaStart,markerdelete) addEventHandler("onClientMarkerHit",markerPizzaStart,function(plr) if plr == localPlayer then punktyp = punktyp + 1 if punktyp < maxpunktyp then outputChatBox("Trwa Oddawanie pizzy..") fadeCamera(false) triggerServerEvent("Freeze",localPlayer,localPlayer) setTimer(function() fadeCamera(true) outputChatBox("Jedz oddaj kolejna pizze") triggerServerEvent("unFreeze",localPlayer,localPlayer) end,5000,1) if isElement(blipGroupElement) then destroyElement(blipGroupElement) end setElementData( localPlayer, 'm', source) usunmarker(hitElement) elseif punktyp == maxpunktyp then if isElement(blipGroupElement) then destroyElement(blipGroupElement) end fadeCamera(false) setElementData( localPlayer, 'm', source) usunmarker(hitElement) triggerServerEvent("Freeze",localPlayer,localPlayer) setTimer(function() outputChatBox("wracaj na baze") fadeCamera(true) triggerServerEvent("unFreeze",localPlayer,localPlayer) end,5000,1) end end end) end end end function usunmarker(hitElement) destroyElement(getElementData(localPlayer, 'm') ) end function guipizza() dxDrawImage(10/scale, 0/scale, 1920/scale, 1080/scale, ":AC-Kosiarki/tlop.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(383/scale, 154/scale, 411/scale, 304/scale, ":AC-Kosiarki/logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) exports['yd-gui_system']:customButton('Rozpocznij Prace',799/scale, 457/scale, 323/scale, 167/scale) exports['yd-gui_system']:customButton('Zakoncz Prace',799/scale, 624/scale, 323/scale, 167/scale) pizzaokno = true end function guiTimer() dxDrawText("Trwa zaladunek pizzy , Dostawca skonczy zamowienie za : "..czas.." sekund", 733, 28, 1143, 128, tocolor(255, 255, 255, 255), 1.00, "default", "center", "top", false, false, false, false, false) end function zakonczprace(plr) if plr == localPlayer then triggerServerEvent("ZniszczPojazdPizza",localPlayer,localPlayer) destroyElement(markerdelete) outputChatBox("zakonczyles\as prace") end end addEventHandler("onClientVehicleExit",resourceRoot,function(plr) if plr == localPlayer then zakonczprace(plr) end end)
  24. Im working on a script wich create flames on the Thrusters of a vehicle (Mammoth Thruster of GTA Online), works well if you are the only that has a Thruster, but if someone also has a Thruster and gets out the vehicle, your Thruster will keep the attached elements and will not destroy the flames if you get out of the vehicle: Here is a video of what is happening: https://www.youtube.com/watch?v=Q3z9fdnBG0w and serverside and clientside scripts that are involved Serverside: (Functions for creating the flames) function LightOn(vehicle, x, y, z) if thePlayer ~= localPlayer then return end light = createMarker ( x , y , z, "corona", 0.5, 255, 160, 0, 170 ) attachElements(light, vehicle, 0, -0.3, -0.8) end addEvent("lighton", true) addEventHandler("lighton", getRootElement(), LightOn) function LightOff() if thePlayer ~= localPlayer then return end if light then destroyElement(light) end end addEvent("lightoff", true) addEventHandler("lightoff", getRootElement(), LightOff) function ThrustersOn(vehicle, x, y, z) if thePlayer ~= localPlayer then return end superhitbox = createObject (3471, x , y , z) setElementAlpha(superhitbox, 0) firethrustl = createObject (2031, x , y , z) firethrustr = createObject (2031, x , y , z) attachElements(superhitbox, vehicle, 0, -10, -1) attachElements(firethrustl, vehicle, 0.47, -0.4, -0.2) attachElements(firethrustr, vehicle, -0.47, -0.4, -0.2) setElementCollisionsEnabled(firethrustl, false) setElementCollisionsEnabled(firethrustr, false) end addEvent("thrusterson", true) addEventHandler("thrusterson", getRootElement(), ThrustersOn) function ThrustersOff() if thePlayer ~= localPlayer then return end if not firethrustl then return end destroyElement(firethrustl) destroyElement(firethrustr) end addEvent("thrustersoff", true) addEventHandler("thrustersoff", getRootElement(), ThrustersOff) Clientside: (Functions that triggers serverside events when you are in the Thruster) Thruster = 465 function SitOnThruster(thePlayer) if thePlayer ~= localPlayer then return end local vehicle = getPedOccupiedVehicle(localPlayer) if ( vehicle and getElementModel (vehicle) == Thruster ) then bindKey("vehicle_fire", "down", shootProjectile) triggerServerEvent ( "onthruster", resourceRoot) local x, y, z = getElementPosition(vehicle) local h, m = getTime() triggerServerEvent("thrusterson", getRootElement(), vehicle, x, y, z) if h > 20 then triggerServerEvent("lighton", getRootElement(), vehicle, x, y, z) else return end end end addEventHandler ( "onClientVehicleEnter", root, SitOnThruster ) function Notsit(thePlayer) if thePlayer ~= localPlayer then return end if Thruster then triggerServerEvent("thrustersoff", getRootElement(), vehicle, x, y, z) triggerServerEvent("lightoff", getRootElement(), vehicle, x, y, z) else return end end addEventHandler ( "onClientVehicleExit", root, Notsit ) function killed() if Thruster then if (isPedInVehicle(localPlayer) and Cars[getElementModel(getPedOccupiedVehicle(localPlayer))]) then if getPedOccupiedVehicleSeat ( localPlayer ) == 1 then return end triggerServerEvent("thrustersoff", getRootElement(), vehicle, x, y, z) triggerServerEvent("lightoff", getRootElement(), vehicle, x, y, z) else return end end end addEventHandler ( "onClientPlayerWasted", localPlayer, killed ) function shootProjectile() if not disparado then local vehicle = getPedOccupiedVehicle(localPlayer) if ( vehicle and getElementModel (vehicle) == Thruster ) then if isVehicleOnGround(vehicle) == false then local x, y, z = getElementPosition(vehicle) projectile = createProjectile(vehicle, 15, x, y+4, z-10) disparado = true setTimer ( function() disparado = false end, 1500, 1 ) else local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 15, x, y, z-3) disparado = true setTimer ( function() disparado = false end, 1500, 1 ) end end end end I'm very confused, i'm trying to make the script only create element for each player.
×
×
  • Create New...