Jump to content

Search the Community

Showing results for tags 'scripting'.

  • 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 would like to know something about ElementData, the most about these two commands {getElementData, setElementData}, could someone help me understand these two things. For example, write a guide that would help me a lot and give me a heart
  2. So I have a question, I have a model to import but I would like this object was only visible in a specific dimension. How can I do this?
  3. I have another question if it can be done so that people from the red team can shoot other players in the head (in the sense that it would kill other players) -- server side red = createTeam("RED", 255, 0 ,0) blue = createTeam("BLUE" , 0, 255, 0) -- client side function RedTeamHeadShotDamage(player, valuedamage, bodypart) if bodypart==9 then killPed(getLocalPlayer()) else cancelEvent() end end function SetRedTeamHeadShotOnly() local redPlayers = getTeamFromName("BLUE") local teamRed = getPlayersInTeam(redPlayers) for i, v in pairs(teamRed) do addEventHandler("onClientPlayerDamage", v, RedTeamHeadShotDamage) end end SetRedTeamHeadShotOnly() Something I mean, can it work?
  4. I have a problem with this script will someone help me? function Resource() local res = getResourceFromName("ResourceTest", true) startResource(res) end addCommandHandler("res", Resource)
  5. Hola hago este mensaje para ver si alguien me puede ayudar pasandome o vendiendome un resource de creacion de bases para un servidor de DayZ de mta desde ya muchas gracias
  6. Hola abro este foro para ver si alguien me puede ayudar mandandome un pack de jobs o algunos en singular para un servidor RPG de mta ya que en internet no hay muchos que funcionen correctamente no importa el idioma en el que esten ya que yo se traducirlos
  7. redditing

    Button

    -- Client Side Button = guiCreateButton(0.45, 0.54, 0.10, 0.06, "Get Value", true) guiSetProperty(Button, "NormalTextColour", "FFAAAAAA") guiSetVisible(Button, false) EditBox= guiCreateEdit(0.41, 0.45, 0.18, 0.04, " chcesz tego kupić sztuk?", true) guiSetProperty(EditBox, "NormalTextColour", "FFFF0000") guiEditSetMaxLength(EditBox, 3) guiSetVisible(EditBox, false) addEventHandler("onClientGUIClick", Button function() local inputBox = tonumber(guiGetEdit(EditBox)) if inputBox==0 then outputChatBox("U set value input "..inputBox, 255, 255, 0) end end) -- Another Client Side addCommandHandler("TurnOnButton", function() guiSetVisible(Button, true) guiSetVisible(EditBox, true) end) I don't know what's wrong, but when I type the command 'TurnOnButton' I can't click the button and the editBox as if they didn't exist
  8. español Hola, inicie un seridor con un amigo y tenemos un problema con los markets, cuando un jugador entra a uno se le aparece el cartel a todos los demas jugadores (Por ejemplo: Un jugador entra al market del job de pizzero a todos los demas jugadores les salta el cartel para tomar el trabajo esten donde esten). Seria genial si alguien nos ayudase ya que si no lo solucionamos nos vamos a ver obligados a cerrar el servidor y no queremos eso, desde ya muchas gracias aqui dejo mi discord: Fede#7027 português Olá, comece um seridor com um amigo e temos um problema com os mercados. Quando um jogador entra em um, o pôster aparece para todos os outros jogadores (por exemplo: Um jogador entra no mercado de pizza para todos os outros jogadores. pule o pôster para aceitar o trabalho onde quer que esteja). Seria ótimo se alguém nos ajudasse, porque se não resolvermos, seremos forçados a fechar o servidor e não queremos isso, muito obrigado aqui deixo minha discórdia: Fede # 7027 english Hello, start a serer with a friend and we have a problem with the markets, when a player enters one, the poster appears to all the other players (For example: A player enters the pizza job market to all the other players skip the poster to take the job wherever they are). It would be great if someone helped us because if we do not solve it we will be forced to close the server and we do not want that, thank you very much here I leave my discord: Fede # 7027
  9. redditing

    BindKey

    Is there a function similar to ToogleControl but with Binds? I mean, there is such a function attached to BindKey (under the "k" key), and I would like to press the "k" function just like in ToggleControl, where we clicked eg left mouse button to shoot
  10. The case looks like this, I have a variable (Let's call it Ammo) that IS TO be in the giveWeapon function (source, 22, Ammo, true) but the problem is that this Ammo variable has the script type "client" and the function is the server script type, so how can I make this variable in this function? If someone has not understood what is going on, there is still a code to simplify... -- Client side local Ammo = 60 local AmmoMarker = createMarker(0, 0, 1, "cylinder", 2.0) local WeaponMarker = createMarker(0, 0, 1, "cylinder", 2.0) addEventHandler("onClientMarkerHit", AmmoMarker, function() Ammo = Ammo + 1 end) addEventHandler("onClientMarkerHit", WeaponMarker, function() -- Here I get a weapon, the variable "Ammo" is the number of bullets end) -- Server Side --??? Problem with importing variable "Ammo"
  11. I would like to do a recoil system in such a way that a player who is hit by someone is thrown upwards simultaneously E <---- this is element X <---- point position example x x x x x E x
  12. After I finished the first version of my character customization system i just realized its such a piece of crap, so i started writing a new version with a whole new concept. The first version worked with CJ skin and i just attached some custom head models to it. Conversely the new version is running with shaders and the skin is a custom dff. Here is a video of the head customization. The clothing is in progress yet, it takes a lot of time because i have to make custom cloth models. Hope you like it. Please don't ask for the source code, this script will never be released. Sorry.
  13. I'm creating a server with minigames, and I'll probably use dimensions to split the maps, and my question is this. If I have a script for a given mini-game, then in every dimension does this script change in its own way ?. I give an example. I have two maps ... the first one is in the first dimension, the name is attached, the script is attached after the player teleports to him and plays with other players who are in the first dimension. But there is also a second dimension with the same script. And this is about whether there will be no undesirable consequences between these two dimensions. For example, with Equipment, at the end of the minigame and resetting it again, I will have to clear Equipment, and I do not know if I will clear the equipment of players who are in this dimension or all who are on the server in general. ; /
  14. table = {} function table.contains(table, element) for _, value in pairs(table) do if value == element then return true end end return false end function tablefind(tab,el) for index, value in pairs(tab) do if value == el then return index end end end function OnClientGuiButton() if not table.contains(BedwarsEQ, "P1") then table.insert(table, "P1") -- Insert to a table string "P1" (Player1) end if tablefind(table, "P1")==1 then -- check index, if is Item in index(1) then == true AdxItem1 = 255 -- dxDrawImage, drawing image to effect SLOT1 = SLOT1 + 1 -- type how many items is in P1 end if tablefind(table, "P1")==2 then -- if is Item in index(1) then check "if is Item in Index(2)" == true BdxItem1 = 255 --second dxDrawImage, drawing image to effect SLOT2 = SLOT2 + 1 --type how many items is in P1 end end addEvenetHandler("onClientGUIClick", button, OnClientGuiButton I will explain the problem. The problem is that when I press the button that gives me to the table "P1", it checks in which index it is. There is a problem that if I click on another button that gives me "P2", it doesn't prove that "P2" is in the table. Debugscript writes to me that the wrong first argument is given in the tableFind function, and that's strange because I checked twice and gave the right one. What's wrong with that?
  15. TPF is bringing opportunities for those players who don't know scripting but wants to learn. We ( TPF staff ) offers free courses in various languages, as well as designing, for totally free. Languages we can teach you? We can teach you Lua, HTML, CSS ,PHP and MYSQL What can we teach you in designing ? Creating logos, creating banners ,posters , web design and MORE !!!(Using Photoshop cs6) Our contact: Contact DiGiTal#2028 or join our discord server : https://discord.gg/BxkW65z For more information and tutorials visit our website : https://tutoplayfun.ml/
  16. I would like to ask where I can find a guide on: createElement, ElementData, Shaders etc. I need it because soon I will be making radar and inventory system. It would be nice if you would share your knowledge on the things I gave
  17. setPedStat(getLocalPlayer(), 24, 650) setPedMaxHealth(getLocalPlayer()) These commands do not want to work, do not show any errors. But unfortunately it doesn't set my health at around 125 points, it just sets me to 100 HP Maybe bug? pls help
  18. executeSQLQuery("CREATE TABLE IF NOT EXISTS `player_stats` (`username` TEXT, `Thirst` INT, `Hunger` INT)") addEventHandler("onPlayerQuit", function (Player) local atsh = getElementData(source, "Thirst") local hungry = getElementData(source, "Hunger") local username = getAccountName(getPlayerAccount(thePlayer)) local result = executeSQLQuery("SELECT * FROM player_stats WHERE `username` = ?", username) if (#result > 1) then executeSQLQuery("UPDATE `player_stats` SET `Hunger` = ?, `Thirst` = ? WHERE `username` = ?", hungry, atsh, username) else executeSQLQuery("INSERT INTO health (username, Thirst, Hunger) VALUES (?, ?, ?)", username, atsh, hungry) end end) addEventHandler("onPlayerLogin", root, function(_, account) local accountName = getAccountName(account) local result = executeSQLQuery("SELECT * FROM player_stats WHERE username = ?", accountName) if (#result > 1) then setElementData(source, "Thirst", result[1].Thirst) setElementData(source, "Hunger", result[1].Hunger) end end) هذا عشان مود الجوع والعطش بحيث ان لو اللاعب سجل خروج وجوعه 50 لما يرجع يصير جوعه 50 ما يصير 100 من فضلكم ساعدوني ليش هذا السكريبت ما يشتغل ؟
  19. سلام عليكم شباب اتمني تكونو بأحسن حال حاولت اسوي رتبة ادمن جديدة غير الرتب المعروفة في باك اب اول جيمنج حاولت اسوي رتبة Server founder وهذه اسماء الملفات اللي عدلت عليها integration --> functions_s if string.find(forumPerms, SERVERFOUNDER) then return exports.anticheat:changeProtectedElementDataEx(thePlayer, "admin_level", 8, true) end integration --> g_configs --MAXIME mysql = exports.mysql TESTER = 25 SCRIPTER = 32 LEADSCRIPTER = 79 COMMUNITYLEADER = 14 TRIALADMIN = 18 ADMIN = 17 SENIORADMIN = 64 SERVERFOUNDER = 88 -- رقم السماح بكتابة الاوامر في قاعدة البيانات LEADADMIN = 15 SUPPORTER = 30 VEHICLE_CONSULTATION_TEAM_LEADER = 39 VEHICLE_CONSULTATION_TEAM_MEMBER = 43 MAPPING_TEAM_LEADER = 44 MAPPING_TEAM_MEMBER = 28 STAFF_MEMBER = {32, 14, 18, 17, 64, 15, 30, 39, 43, 44, 28, 88} AUXILIARY_GROUPS = {32, 39, 43, 44, 28, 88} ADMIN_GROUPS = {14, 18, 17, 64, 15, 88} staffTitles = { [1] = { [0] = "Player", [1] = "Trial Administrator", [2] = "Administrator", [3] = "Senior Administrator", [4] = "Lead Administrator", [5] = "Server Managment", [6] = "-", [7] = "Vice Founder", [8] = "Server Founder", -- الفاوندر }, integration --> g_staff function isPlayerServerFounder(player) if not player or not isElement(player) or not getElementType(player) == "player" then return false end local adminLevel = getElementData(player, "admin_level") or 0 return (adminLevel >= 8) -- اللفل حق الادمن end admin-system --> Player --> s_player_commands حاولت اخلي الفاوندر بس هو اللي يسوي امر givemoney وهذا التغيير موجود في admin-system --> Player --> s_player_commands والامر اهو function giveMoney(thePlayer, commandName, target, money, ...) if exports["integration"]:isPlayerServerFounder(thePlayer) then if not (target) or not money or not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Partial Player Nick] [Money] [Reason]", thePlayer, 255, 194, 14) else local username = getPlayerName(thePlayer) local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target) if targetPlayer then money = tonumber(money) or 0 if money and money > 500000 then outputChatBox("For security reason, you're only allowed to give a player less than $500,000 at once.", thePlayer, 255, 0, 0) return false end if not exports.global:giveMoney(targetPlayer, money) then outputChatBox("Could not give player that amount.", thePlayer, 255, 0, 0) return false end هذه التغييرات فقط اللي سويتها وما سويت شئ غيرها وهذا الخطأ اللي يظهرلي في debugscript ساعدوني رجاءً ملاحظة : SERVERFOUNDER عشان الكود دا function getAdminGroups() -- this is used in c_adminstats to correspond levels to forum usergroups return { SUPPORTER, TRIALADMIN, ADMIN, SENIORADMIN, LEADADMIN, SERVERFOUNDER } end
  20. executeSQLQuery("CREATE TABLE IF NOT EXISTS `player_stats` (`username` TEXT, `Thirst` INT, `Hunger` INT)") addEventHandler("onPlayerQuit", function (Player) local atsh = getElementData(source, "Thirst") local hungry = getElementData(source, "Hunger") local username = getAccountName(getPlayerAccount(thePlayer)) local result = executeSQLQuery("SELECT * FROM player_stats WHERE `username` = ?", username) if (#result > 1) then executeSQLQuery("UPDATE `player_stats` SET `Hunger` = ?, `Thirst` = ? WHERE `username` = ?", hungry, atsh, username) else executeSQLQuery("INSERT INTO health (username, Thirst, Hunger) VALUES (?, ?, ?)", username, atsh, hungry) end end) addEventHandler("onPlayerLogin", root, function(_, account) local accountName = getAccountName(account) local result = executeSQLQuery("SELECT * FROM player_stats WHERE username = ?", accountName) if (#result > 1) then setElementData(source, "Thirst", result[1].Thirst) setElementData(source, "Hunger", result[1].Hunger) end end) it isn't working please help
  21. Hello, could someone tell me what commands I will need to make my crosshair (I mean this crosshair while holding AK-47, M4, SMG etc.)
  22. redditing

    Inventory

    Hi, I would like to make an inventory system, could anyone give me commands to create this work? and I don't mean ready scripts or anything because I want to do it myself, I just don't know where to start here. I would like to ask for all the commands that I will definitely need.
  23. Hello, I would like to know how to set npc rotation towards the player (To NPC just look at the player) preferably using the command "getElementPosition" (client resource)
  24. I would like to know what commands I should use to create a custom radar
  25. I created a youtube player, and i want to remove the event handler, when the music ends, but i dont know how to get the song length from web browser... anyone can help?
×
×
  • Create New...