Jump to content

Search the Community

Showing results for tags 'sa'.

  • 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. Xwaw

    Ped scripting

    Ok so recently I was thinking of reworking the police from gta san andreas to mta san andreas and making a police waves style minigame you have to survive. I have an idea how to do it but I don't know if the engine will allow me to do it. So my question is, if I want to program a ped to get to the player's position avoiding obstacles (without jumping over them) with the a* algorithm, am I able to do that? Because the last time I did this type of thing, one such npc could crash my entire game. As for the respawn of such bots, it would work more or less in the same way as in the original version of gta sa
  2. Xwaw

    Nitro value

    Hello Is it possible to somehow check the value of how much NOS you have in the vehicle because I am looking for but not which do not seem to work as if they were not at all. I need this value to make a bar that will show how much nitro the vehicle has.
  3. Hi I wanted to learn how to create my own shaders for this game from lighting starting to moving texture on the wall. I would really like someone to give me a link to a page where I can find all the functions or if someone wants to explain to me what it is all about
  4. How to check the recoil of a weapon. Notice that when you shoot, for example, with an ak47, it starts with a slight recoil and after 3 seconds when you hold it, you have a large recoil and it stops at this recoil, then the bullets fly in all directions when you are, for example, on poor level. Therefore, is there something to check the recoil of a given weapon so that the int changes at the time of the initial recoil and the final recoil? Maybe the getWeaponProperty function but I don't see anything that could check it because "spread" for example stops on the same recoil.
  5. Здравствуйте, дорогие обитатели форума Multi The Auto San Andreas. Не давно открылся сервер в просторе : MTA:SA Этот проект мы назвали: Sworld Project. На проекте вас ждёт бонус: 100k SworldCoin В Донате это 1кк. Панель управления игрока: F1 Интерфейс сервера! Хорошая оптимизация, хороший автопарк проекта, всем удачи хочется видеть онлайн 100 человек) Наша группа VK: https://vk.com/sworld_rpg IP: mtasa://5.196.112.104:22034
  6. Anyone can send me a working yt mp3 converter API? Or how to create one, to play music from youtube on my server?
  7. In total, I have two questions, but on the same topic: - Is it possible to add an object instead of replacing it with another? - If not, what objects are not used by GTA / MTA San Andreas?
  8. My goal is simple, after using GetPedCollisionTarget, I want it to return 3 numbers that correspond to the coordinates of the target that has collision detection, but for this function to return something, you must first aim the weapon. And here is the problem because when the player is aiming, the crosshair is somewhere close but not in the center of the center, and I want to get the coordinates of the target in the center, not somewhere nearby. And here comes the question, is it possible to make GetPedCollisionTarget work but without aiming the weapon? PLEASE HELP
  9. A simple script of dressable characters and deformable faces. You can move every vertex of the head with a simple displacement shader. The script is in test state right now, I'll create a new editor later. Hope you like it.
  10. Hi, Because we have an atmosphere called winter, why is it only in reality? Abo, because you do not have this script that will add a winter climate to your server and its players. Together with the team, we have created another project! F7 - turning off the snow on the screen Download: https://www55.zippyshare.com/v/cwmhgfTo/file.html Video:
  11. Witam! gdzie muszę uzupełnić, gdzie wpisac nazwe skryptu mojego zeby działało za ta komendą function startTheResource ( thePlayer, command, resourceName ) if ( resourceName ) then -- Check if they specified a resource name local resource = getResourceFromName ( resourceName ) -- Get the resource local start = startResource ( resource ) -- Start the resource if ( start ) then -- If it was successfully started... outputChatBox ( resourceName .. " was started successfully.", thePlayer, 255, 0, 0 ) else -- If it wasn't successfully started... outputChatBox ( "This resource doesn't exist.", thePlayer, 255, 0, 0 ) end else -- If they didn't put a resource name... outputChatBox ( "Please specify a resource to start.", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "resource-start", startTheResource ) -- Make it trigger when somebody types "/resource-start" https://wiki.multitheftauto.com/wiki/StartResource
  12. I've been working on a script that realistically manipulates the wheels. I've gotten to the point I can hide the original wheels, in hopes I can later attach a new set in the same place. I'm aware I might have to use attachElements, and several other functions. For the moment, I'd like to attach a single wheel. I've got this: -- All GUI elements. local vehicle = getPedOccupiedVehicle(localPlayer) local x1, y1, z1 = getVehicleComponentPosition(vehicle, "wheel_lf_dummy") local x2, y2, z2 = getVehicleComponentPosition(vehicle, "wheel_rf_dummy") local x3, y3, z3 = getVehicleComponentPosition(vehicle, "wheel_lb_dummy") local x4, y4, z4 = getVehicleComponentPosition(vehicle, "wheel_rb_dummy") local function replace1 () attachElements (1097, vehicle, x1, y2, z1, 0, 0, 0) end addEventHandler ("onClientGUIClick", set1, replace1, false) -- Function runs when button called 'set1' is clicked. -- Everything else. Here's my thought process: First, I get the player's vehicle. Then, I get the position of all four wheels in the player's vehicle, and represent them with x1, y1 and z1. With all wheels hidden by another function, I then attach the wheel model in the same place as the front left wheel. At the moment, I'm only aiming at the position; I'll handle the rotation later. DB 3 can't identify '1097', and thus asks for a valid element. Am I on the right path?
  13. I've been working on my own server for a few weeks now. After adding mods for vehicles, weapons and skins rocketed it to aproximatelly 500mb. I've found servers that are filled with skins, great mappings, scripts and more, and they weight around 200mbs. They have more skins, a lot more scripts and complex functions, new textures for buildings; basically, a complete make-over. I've only heard about the word "compiling". I'm confident there are other ways to reduce the weight for the client. Is there such thing as "server-side mods"? These are the heaviest. Maybe moving them server-side reduces the downloaded content significantly.
  14. I made this: -- All other functions and GUI creation. -- [...] -- Created button called "fbumper". local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) -- Everything else... It works. Then I wanted to have the button switch between true to false when clicked. Something like: local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) elseif getVehicleComponentVisible(theVeh7) == "false" then setVehicleComponentVisible(theVeh7, "bump_front_dummy", true) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) guiSetVisible (vehmod, false) It doesn't work correctly. It sets it invisible, but it doesn't return the state to visible. I also thought about using the setVehicleComponentVisible (not setVehicleComponentVisible) to make it a little bit more compact. I'm using a setEngineState script to help myself, but I don't know how to use it with these arguments. DB 3 throws nothing. What am I doing wrong?
  15. 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?
  16. I decided to dive into the world of rotations. I know this might be incomplete and even incorrect: function openCapo() local theVeh = getPedOccupiedVehicle(localPlayer) local value1 = guiScrollBarGetScrollPosition(caposcroll) if theVeh and value1 then setVehicleComponentRotation (theVeh, bonnet_dummy, value1, rY, rZ) end end I've a GUI already created, and the visibility key bound. The first scrollbar (caposcroll) should affect the bonnet_dummy. This was made with absolute basic thinking process: "if I want doors to open, I need to get the position of the scrollbar". However, I know I still need to tell the game what's the math.min, what's the math.max, and, I think, to also give the order to respond only when the scrollbar is moved. I would appreciate a finger to point me in the right direction.
  17. Hello, everybody! I'm following this tutorial to make a GUI with a car spawning function. Copy/pasting everything works up until the gridlist. The click doesn't. Could there be a mistake? I recreated the script on my own following step by step: - Client-side - And here is the problematic part: The GUI elements are the same. The only thing that changes are the names. Naturally, it should work by simply replacing the names. However, I believe there might be a mistake on the original script. With everything as it is, I can show and hide the GUI, and click on any vehicle. If I purposely trigger an output, nothing happens. So, waddaya think?
  18. I have this: -- 2 points on each city. local spawnCoords = { {1125, -2036, 69.89, -90}, {2504, -1686, 13.55, 45}, {-1972, 643, 46.57, -45}, {-2720, -317, 7.85, 45}, {2023, 1008, 10.83, -90}, {1298, 2084, 12.83, -90}, } -- all skins. 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, 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} function spawnPoints (player) local x,y,z,r = unpack(spawnCoords[math.random(1,#spawnCoords)]) spawnPlayer(source, x, y, z, r, validSkins[math.random(1,#validSkins)]) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin", getRootElement(), spawnPoints) Althought it works, after giving it several tests, I realized the spawn locations where always in the same order, as well as the skins. Coincidentally, I've reached the tables subject in the MTA's tutorial, and I learned about <for key, value in pairs(table) do>. Contrary to "ipairs", "pairs" is supposed to give you a random reading throughout the table everytime the script is ran. I used 'broph.Lua' as a way to understand the process, and to make sure that if I do the same, it'll work. My small knowledge told me that, by adding <for key, value in pairs(spawnCoords) do> right after the beginning of the function, I would get the random effect of the table reading. However, the result is far from what I expected: it destroys the function, and the player doesn't spawn at all (black screen). I'm continuing the tutorial, but 'in pairs' is the last thing NanoBob mentions about the tables. This time, I'd like a bit of a challenge, so if you could give me the hints and point me in the right direction, I would appreciate that.
  19. Here's the script: inFourD = createMarker (2019.76953125, 1007.0116577148, 9.7203125, "cylinder", 1, 255, 0, 0, 153) function inFourDragons (player, matchingDimension) if (source == inFourD) and (getElementType(player) == "player") and (isPedInVehicle(localPlayer) == true) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", hitPlayer, 0, 0, 0, true) elseif (source == inFourD) and (getElementType(player) == "player") and (isPedInVehicle(localPlayer) == false) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Ingresaste al casino '#DD0000Four Dragons#FFFFFF'.", hitPlayer, 0, 0, 0, true) setElementInterior (player, 10) setElementPosition (player, 2016.9376220703, 1017.0843505859, 996.875 ) setElementRotation (player, 0, 0, 90) end end addEventHandler ("onMarkerHit", getRootElement(), inFourDragons) Doing it client-side gives the invisible players. I read an old post that this had to be done server-side to fix the invisible players; however, I can't pinpoint the problem. As of this moment, with this script: - When in vehicle, player + vehicle is teleported to the same coords and interior 10, which results in an invisible world, player and vehicle, and it outputs "You've entered FDC.", when it should enter "Cars are not allowed". - When on foot, nothing happens. What could be the problem?
  20. I've made a server-type .Lua that should apply several 'setWeaponProperties' to the weapons. It works for some weapons, but not for others. For example, I've set the Deagle (replaced with a 6 bullet drum) to 'maxiumum_clip_ammo' = 6. This works correctly. However, with other weapons, it doesn't. Here's the script: function weaponProps () -- M9 -- setWeaponProperty(22, "pro", "maximum_clip_ammo", 14) -- Revolver -- setWeaponProperty(24, "pro", "maximum_clip_ammo", 6) -- Shotgun -- setWeaponProperty(25, "pro", "maximum_clip_ammo", 7) -- Uzi -- setWeaponProperty(28, "pro", "maximum_clip_ammo", 30) -- AKMS -- setWeaponProperty(30, "pro", "maximum_clip_ammo", 35) -- G36 -- setWeaponProperty(31, "pro", "maximum_clip_ammo", 40) -- Kar -- setWeaponProperty(33, "pro", "maximum_clip_ammo", 5) -- Mosin -- setWeaponProperty(34, "pro", "maximum_clip_ammo", 1) end addEventHandler ("onResourceStart", getRootElement(), weaponProps) Essentially, it runs as soon as the resource is started. As a beginner's test, I'm only modifying the max ammo clip. It works for: - Deagle (Revolver) - Shotgun - AK-47 (AKMS) - M4 (G36) - Rifle (Kar) - Sniper (Mosin) It doesn't work for: - Colt (M9) - UZI
  21. I recently dove into this simple thing called "scripting and building a server". Naturally —added to my already curious personality—, I always come up with a doubt, a question, or any sort of uncertainty. After a week of messing around with it, I noticed that 5 of the 10 last posts made in the Script section were from me. I was having so much fun —truthfully— that I just kept on finding new things to ask. I'm pretty sure they are common questions. I'm not asking to have a script from scratch, or to be taught absolutely everything. It is most commonly about errors and to help myself understand the colloquial language of the scripts. However, I can't help but think that maybe it's not the best approach. I always think to myself "try to find it on your own", but I frenquently find myself getting even more confused the more I tour into each command and function. Is there a certain tacit limit as to how many questions can be asked? Is there any way to get the necessary help without flooding the sections?
  22. I've been messing around with 'setWeaponProperty' in order to understand how it works. I changed how the deagle is handled. Decided to undo the changes and, upon resetting everything, the weapon bugged. Image Any script with 'setWeaponProperty' has been removed, and the resource has been stopped and removed from metaserver.conf. Fixed after several restarts and total wipe of downloaded resources.
  23. I've found six issues so far. Being alone, everything seemed fine; with players, these issues are visible. For the sake of organization and to avoid overwhelming, I'll be going through each issue (if possible), instead of throwing everything at once —unless asked otherwise—. First in the list is about client.Lua's 'outputChatBox' showing to everyone in the chatbox: I've got two scripts in this moment that are causing said inconvenient: a quick ATM system and a teleport system. The ATM is a simple marker that, when hit, gives you $500, and outputs that information. The teleports work the same way, but instead, the set the interior, position and rotation of the player, and output a message. ATM: Client: (this example's location is at LV's gas station, next to Four Dragon's Casino). atm1 = createMarker (2123.0048828125, 897.57653808594, 10.1796875, "cylinder", 1, 0, 100, 0, 170) function moneyLawn (hitPlayer, matchingDimension) if (source == atm1) and (isPedInVehicle(hitPlayer) == false) then triggerServerEvent ("givePlayerMoney", hitPlayer) outputChatBox ("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: El servidor te regaló #006400$500.", 0, 0, 0, true) end end (translation: "The server gave you $500") Server: function giveToPlayer () givePlayerMoney (root, 500) end addEvent ("giveMoney", true) addEventHandler ("giveMoney", root, giveToPlayer) Because of its close relation, I'll also name another issue regarding this script. The money is being given to all players in the server, and it is being multiplied by each player. This means that is, for example, I have 3 players in my server, when any player touches the marker, each player will be given $500 x amountOfPlayers = $1500. Teleports: (I have a few other teleports, but they only change interior and position). Client: ------------------------- -- FOUR DRAGONS CASINO -- ------------------------- inFourD = createMarker (2019.76953125, 1007.0116577148, 9.7203125, "cylinder", 1, 255, 0, 0, 153) function inFourDragons (hitPlayer, matchingDimension) if (source == inFourD) and (isPedInVehicle(hitPlayer) == true) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", 0, 0, 0, true) elseif (source == inFourD) and (isPedInVehicle(hitPlayer) == false) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Ingresaste al casino '#DD0000Four Dragons#FFFFFF'.", 0, 0, 0, true) setElementInterior (hitPlayer, 10) setElementPosition (hitPlayer, 2016.9376220703, 1017.0843505859, 996.875 ) setElementRotation (hitPlayer, 0, 0, 90) end end addEventHandler ("onClientMarkerHit", root, inFourDragons) outFourD = createMarker (2018.9376220703, 1017.0843505859, 995.875, "cylinder", 1, 255, 0, 0, 153) setElementInterior (outFourD, 10) function outFourDragons (hitPlayer, matchingDimension) if (source == outFourD) and (isPedInVehicle(hitPlayer) == true) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", 0, 0, 0, true) elseif (source == outFourD) and (isPedInVehicle(hitPlayer) == false) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Te retiraste del casino '#DD0000Four Dragons#FFFFFF'.", 0, 0, 0, true) setElementInterior (hitPlayer, 0) setElementPosition (hitPlayer, 2021.76953125, 1007.0116577148, 10.7203125 ) setElementRotation (hitPlayer, 0, 0, 90) end end addEventHandler ("onClientMarkerHit", root, outFourDragons) [translation: (if player in veh) "No cars allowed". (if player not in veh) "You've entered/exited "Four Dragons" casino".] There is no server. This similar post, which I'm following, says that in client-side, the output is bound to be shown just for the player who triggered the event.
  24. I've successfully created a marker that triggers 'givePlayerMoney' and 'outputChatBox' when 'onClientMarkerHit' in a client.Lua. Does the server see the amount of money the player now has? Do I have to sync the money to the server with some kind of 'getPlayerMoney' in a server.Lua? I'm planning on making a weapons GUI that works with the player's money.
×
×
  • Create New...