Search the Community

Showing results for tags 'help'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 699 results

  1. addEventHandler("onPlayerLogout" Function () if playervehicle then BlowVehicle (source) end بدي لما يخرج الاعب من السيرفر سيارته تنفجر او تنحذف عشان ما تكثرلي السيارات بلبداية و كودي مخرب تماما .. حد يصلحه
  2. I need a script for players who have weak PCs to disable textures
  3. onPlayerLogin setCameraMatrix setTimer createVehicle moveVehicle resetTimer شباب بدي متطلبات الانترو انا اعرف هذول و بس لاني جديد في البرمجه ساعدوني @Rakan# @Abdul KariM
  4. Help me .. i created script like .. createProjectile when ped shoots.. what ever .. when i make it like this ... -- 1st Exemple createProjectile(localPlayer, 20, xw, yw, zw+1, 1.0,localPlayer,0,0,0,0,0,0.1) The ped shoot ( missels .. but to many ( as number of players ) if 5 then he shoot 5 .. and the missile can kill .. that's cool BUT when i put it like this.... ( and that what i need ) createProjectile(source, 20, xw, yw, zw+1, 1.0,localPlayer,0,0,0,0,0,0.1) bot shoot 1 missle and target 1 player and that missle doesn't damage . i mean even he shooting on other player the missle still targeting me everyshot .. .. any suggestions ?
  5. Hello! I have scripted a pay command but I dont want guest accounts to be able to use it because they can send infinite amounts of money. I tried to put a condition with if that would make a guest account unable to use the command, but I get an error stating that condition is missing an "end". I tried to put dozens of end after or even just one but the result is always the same. addCommandHandler( 'pay', function( source,_,player,amount ) local find = findPlayer( player ) if find then local sourceAccount = getPlayerAccount ( playerSource ) local guestAccount = getPlayerAccount ( playerSource ) if (guestAccount == guest) then return else if amount then givePlayerMoney( find,tonumber( amount ) ) takePlayerMoney ( source, tonumber(amount) ) outputChatBox( '[Pay]:You transfered '..amount..'$ to '..getPlayerName( find ),source,255,0,0 ) outputChatBox( '[Pay]:You received '..amount..'$ from '..getPlayerName( source ),find,0,255,0 ) else outputChatBox( '[Pay]:/pay [playername][amount]!',source,255,0,0 ) end else outputChatBox( '[Pay]: You are not logged in!',source,255,0,0 ) end else outputChatBox( '[Pay]:Player not found!',source,255,0,0 ) end end end )
  6. Hello, I made a script that makes a command (/useheroin) which uses the heroin drug and give 200 max hp to the player aswell as Healing him for 60 seconds. However I'm having the issue where if two players use the command in less than 60 seconds, one of them won't get their health set back to 100. --HEROIN DRUG EFFECT ON function heroinDrugOn(player) theDrugPlayer = player setPedStat ( player, 24, 1000) setTimer(heroinDrugOff, 60000,1) setElementHealth(player, 200) triggerClientEvent ( theDrugPlayer, "heroinOnMessage", root) end addCommandHandler("useheroin", heroinDrugOn) --HEROIN DRUG EFFECT GOING OFF function heroinDrugOff(client) local playerHealth = getElementHealth(theDrugPlayer) if (playerHealth > 100) then setPedStat (theDrugPlayer, 24, 590) setElementHealth(theDrugPlayer, 100) else setPedStat (theDrugPlayer, 24, 590) setElementHealth(theDrugPlayer, playerHealth) end triggerClientEvent ( theDrugPlayer, "heroinOffMessage", root) end
  7. --------------------------- MTA: San Andreas (CTRL+C to copy) --------------------------- There was a problem starting MTA:SA Direct3D CreateDevice error: 88760868
  8. Hello, I'm doing a base-system but I have a problem because when triggering from c-side to s-cide it crashes "Error" but the name and password are good Server addEvent("Base-System_",true) addEventHandler("Base-System_",root,function(text1,text2) if not text1 and text2 then return end local konto = dbQuery (connect, "SELECT * FROM `Bazy` WHERE `nazwa`=?",text1) local results = dbPoll(konto,-1) if (#results == 0) then outputChatBox("Error",source) else for i,v in ipairs(results) do if text2 == v.haslo then setElementData(source,v.dim) outputChatBox("Error",source) setElementPosition(source,-42.57263, -343.16113, -49) end end end end) c-side addEventHandler("onClientGUIClick",GUIEditor.button[5],function() if source==GUIEditor.button[5] then local text1 = guiGetText(GUIEditor.edit[1]) local text2 = guiGetText(GUIEditor.edit[2]) if text1 and text2 then triggerServerEvent("Base-System_",localPlayer,text1,test2) end end end)
  9. JanKy

    Gang Kick

    Hi guys, Can someone help me understand what am i doing wrong? I mean, i have a gang resource for my DayZ server and the kick function wont work properly. I mean, the leave function works fine But, when i try to kick a friend, it gets kicked out of the gang but it still remains in tab as in that gang, and can open the gang panel ( F2 ) but it is empty. I even tried to replace nil with "None" because that's the default value for every player which isn't part of any group. Thanks in advance.
  10. Hello! I've been working with MTA team on implementing the ability to play custom IFP animations in MTA since a couple of months. Today, I want to notify you all that it's done after a lot work, this means you can create your own IFP animations in 3ds Max using Kam's script, play them in MTA:SA (not released yet) using Lua scripting functions. I've created my pull request on github which you can find here. Everything's pretty much done, but there's one problem, the pull request cannot be merged into the master branch because there's a lot of code to go through, this will make fixing bugs very difficult, so we'll need to test everything in every way possible before releasing. MTA used to have a lot of developers back in the days who designed the core of the software that we have today, I appreciate their work, and I'm forever grateful for their contribution. There are still a few developers from the MTA team and other old contributors who spends hours upon hours on making MTA better, and get literally nothing out of MTA for their work, but they still do it . My point is, MTA has potential, and together, we can make it better, not having enough time to test everything out is on the main reason why we still don't have this feature implemented into MTA's main branch, so I'm here to ask the community for help in testing this feature. There are so many gamemodes that can take advantage of this feature. We still have plenty of RP servers here, and they still keep increasing till this day. RP servers have almost everything they need, server developers keep trying their best to push the limits in order to have more realism, I honestly believe this will fix that problem, or at least improve it. Here are two video: What is IFP? IFP is the animation file format for GTA III, SA, and VC. Adding support for this file format will allow us to play any custom animation which are made for GTA:SA and GTA:VC. You can load as many IFP files you wish to, you can have hundreds of thousands of animations. Note: GTA III animations are not supported for now. How you can help: As much as everyone wants to have custom animations in MTA, I would love to see them as well. You can help by testing different IFP files, and report bugs on this thread. Download the new MTA:SA from here: Right-click on, extract the files to some location on your computer, I usually extract them to my desktop. Download the resources from here: Create a folder with name "resources" in InstallFiles\server\mods\deathmatch, and extract to InstallFiles\server\mods\deathmatch\resources. Start your MTA:SA server from location: InstallFiles\server\MTA Server.exe, and then start the ifp test resource from console "start ifptest" Now launch MTA from InstallFiles\Multi Theft Auto.exe, join your server. Use keys 1, 2, 3, 4, or 5 to play the custom parkour animation from parkour.ifp in ifptest. How to report bugs? When you are playing custom animations, if something's not working the way it should be, or if MTA crashes then please fill this form and reply to this thread: IFP download link: (put the download link here for IFP, so I can download and test it myself) Description: (Explain what the bug is) Steps To Reproduce: (write the steps on how I can reproduce the bug myself) Example: IFP download link: Description: When I play this animation named "CartWheel," I can't move for a while, and MTA crashes. Steps To Reproduce: 1. Load "gta4.ifp". 2. play animation named "CartWheel" using setPedAnimation. 3. MTA crashes. If you want to submit the bug report by PM on forum then feel free to do so. I've added the resource "ifptest" to show you how to play custom animations. You can check how I did it by checking InstallFiles\server\mods\deathmatch\resources\ifptest\client.lua. About the new Lua functions, quoting myself: "There are three new Lua functions added: // loads IFP with a custom block name ifp engineLoadIFP ( string ifp_file_path, string custom_block_name ) // this will replace an internal GTA animation with custom one, it's a light-weight operation, // don't worry too much about performance. Different peds can have different running, walking, // crouching, shooting, etc. animations all running simultaneously because we are not actually // replacing animation hierarchies, we are merely storing everything in std::map which is in // CClientPed. When an animation triggers, we get the ped by clump, and play the animation // we wish to play. setPedAnimation works a little different than this, but the idea is same. bool engineReplaceAnimation ( ped thePed, string block_name, string anim_name, string custom_block_name, string custom_anim_name ) // This will restore animation replaced using engineReplaceAnimation, if only 1 parameter // is provided which is ped, then it will restore all animations, if block name is also provided, // then it will restore animations of that block only, if animation name is provided as well, // it will restore that specific animation only. bool engineRestoreAnimation ( ped thePed [, string block_name, string anim_name ] ) " To add your own ifp file, just add this to meta.xml: <file src="YourIFPFileNameHere.ifp" /> then in client-side Lua script, you can do: local customIfp = engineLoadIFP ("YourIfpNameHere.ifp", "YourCustomBlockNameHere") setPedAnimation ( localPlayer, "YourCustomBlockNameHere", "YourCustomAnimationNameHere" ) If you have any questions, write them here.
  11. Hello, I'm trying to make a script to reload weapons but I can't get it working function weaponReload() local wep = getPlayerWeapon ( localPlayer ) setWeaponClipAmmo(wep, 7) end addCommandHandler("reload", weaponReload) I tried this to reload my desert eagle but it outputs the following error : I don't really see what else than the weapon ID I could use that expected weapon error Anyone knows how to fix it? EDIT: After further research it turns out there was a built-in resource in the MTA files, problem solved
  12. function walkstyle(thePlayer) setPedWalkingStyle(localPlayer,128) end function walk ( thePlayer ) elseif isObjectInACLGroup("user."..walk, aclGetGroup("Console")) then walkstyle(thePlayer) end end addCommandHandler("walk", walk) I couldn't fix it. How can i fix this code.
  13. Hello dear users of this forum! I'm a beginner in Lua and I don't how to start learning. I know some other languages. As JavaScript, Python, Pawno and etc. Can you help me with it? Which plugin create me for start? Thank you in advance and sorry for my English.
  14. Hello! I have question: "Is possible to create a rotation of image made by "dxDrawMaterialLine3D ?? "". Please fast return message.
  15. Hello There. Well my problem is really annoying. I downloaded MTA properly and after launching MTA everything was fine and when I click "Map Editor" a small window pops up "Starting local server.." Then nothing happens after that. I literally waited for 30 minutes. Thanks for your help!
  16. function noRadio() setRadioChannel(0) addEventHandler('onClientPlayerRadioSwitch', getRootElement(), function() cancelEvent() end ) end function off() stopSound(sound) noRadio() play1() end addEvent( "off", true ) addEventHandler( "off", localPlayer, play ) function play1() noRadio() stopSound(sound) outputChatBox("Radio 1!!" ) local vehicle = getPedOccupiedVehicle(getLocalPlayer( )) local x,y,z = getElementPosition( vehicle ) sound = playSound3D( "", x, y, z) setSoundMaxDistance( sound,50 ) attachElements ( sound, vehicle) end addEvent( "r1", true ) addEventHandler( "r1", localPlayer, play1 ) function play2() noRadio() stopSound(sound) outputChatBox("Radio 2" ) local vehicle = getPedOccupiedVehicle(getLocalPlayer( )) local x,y,z = getElementPosition( vehicle ) sound = playSound3D( "", x, y, z) setSoundMaxDistance( sound,50 ) attachElements ( sound, vehicle) end addEvent( "r2", true ) addEventHandler( "r2", localPlayer, play2 ) function play3() noRadio() stopSound(sound) outputChatBox("Radio 3") local vehicle = getPedOccupiedVehicle(getLocalPlayer( )) local x,y,z = getElementPosition( vehicle ) sound = playSound3D( "", x, y, z) setSoundMaxDistance( sound,50 ) attachElements ( sound, vehicle) end addEvent( "r3", true ) addEventHandler( "r3", localPlayer, play3 ) function play4() noRadio() stopSound(sound) outputChatBox("Radio 4!!" ) local vehicle = getPedOccupiedVehicle(getLocalPlayer( )) local x,y,z = getElementPosition( vehicle ) sound = playSound3D( "", x, y, z) setSoundMaxDistance( sound,50 ) attachElements ( sound, vehicle) end addEvent( "r4", true ) addEventHandler( "r4", localPlayer, play4 ) how can i stop sound only for me without stopping others sound?? like when i switch radio station it stops "sound" which stops everyones
  17. Hi ! I just downloaded a simple script that puts NOS into cars when u hold fire. I wanted to make it so it only works for selected serials but now i get this error : ERROR : Loading script failed: nos\nitro.lua:17: unexpected symbol near ')' Please help ! Attached code bellow Engedelyezettserial means AllowedSerials engedelyezettserial = { [""]=true, -- NoOne [""]=true, -- Mili ["9BC41DB2DB129348886FB6A5603433F2"]=true, -- Jani } g_Me = getLocalPlayer( ); g_Root = getRootElement( ); g_ResRoot = getResourceRootElement( ); addEventHandler( "onClientResourceStart", g_ResRoot, function( ) if engedelyezettserial[getPlayerSerial(thePlayer)] then bindKey( "vehicle_fire", "both", toggleNOS ); bindKey( "vehicle_secondary_fire", "both", toggleNOS ); end ) function toggleNOS( key, state ) local veh = getPedOccupiedVehicle( g_Me ); if engedelyezettserial[getPlayerSerial(thePlayer)] then if veh and not isEditingPosition then if state == "up" then removeVehicleUpgrade( veh, 1010 ); setControlState( "vehicle_fire", false ); else addVehicleUpgrade( veh, 1010 ); end end end
  18. WelCome


    Hi today i want create a base system but i have problem addCommandHandler("base_open",function(plr,command,name,pass) if name and pass then local find = xmlFindChild(xmlFile,name,0) for _,v in ipairs ( xmlNodeGetChildren ( xmlFile )) do local password = xmlNodeGetAttribute(v,"Password") end if find then outputChatBox("TesT",plr,255,0,0) end end end) and I want to get the value of the "password" variable and check if it is equal to the pass pass
  19. Hello, I am Scripting a zombie rpg server and as I disabled headshot kills on zombies, I would like to make a damage multiplier system depending on the body part hit when you shoot a zombie. I have been trying to use this script (not mine): local weaponTable = { -- populate this list by adding weapons: -- [weap_id] = { torso, ass, left_arm, right_arm, left_leg, right_leg, head } [24] = { 75, 50, 30, 30, 25, 25, 150 }, } addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if getElementType(attacker) == "player" and getPlayerWeapon(attacker) and weaponTable[ getPlayerWeapon(attacker) ] then setElementHealth(source, getElementHealth(source) - weaponTable[ getPlayerWeapon(attacker) ] [ bodyPart - 2] + loss) end end ) but it didn't work on both players and zombie peds. If someone has a solution for this to work the way I want it would be great (ideally both player and zombie ped multiplier but ped multiplier is more important)
  20. Somehow i can make this possible? When a player connect, then he have to wait the end of download, then he can use the fr gui. I want make fr gui usable when player download the mods. Sorry for my bad english..
  21. Hi guys,im stuck here... I want when i press on GUIEditor.button[1] it sends that i typed in GUIEditor.edit[1] to selected player.. --client GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 528) / 2, (screenH - 183) / 2, 528, 183, "dm panel - gat", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(29, 32, 186, 142, false, GUIEditor.window[1]) local column = guiGridListAddColumn(GUIEditor.gridlist[1], "players", 0.9) GUIEditor.button[1] = guiCreateButton(247, 107, 271, 60, "DM", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.edit[1] = guiCreateEdit(247, 32, 269, 65, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(216, 63, 31, 15, "close", false, GUIEditor.window[1]) for id, player in pairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, getPlayerName ( player ), false, false ) guiSetVisible(GUIEditor.window[1], false ) end end ) function show () if guiGetVisible(GUIEditor.window[1] ) then guiSetVisible(GUIEditor.window[1], false ) showCursor (false) else guiSetVisible(GUIEditor.window[1], true ) showCursor (true) end end addCommandHandler("dm", show) function clickin () if source == GUIEditor.label[1] then guiSetVisible(GUIEditor.window[1], false ) showCursor (false) elseif source == GUIEditor.button[1] then if guiGetText(GUIEditor.edit[1] ) == "" then return end --im stoped here, showCursor (false) guiSetVisible(GUIEditor.window[1], false ) end end addEventHandler("onClientGUIClick", root, clickin)
  22. How can players make money by shooting 5 targets?
  23. Revin

    MTA Crashing

    I was trying to play MTA like 3 days ago and im getting the same error in many servers (MTA is crashing) Version = 1.5.5-release-11999.0.000 Time = Wed Jun 6 19:37:34 2018 Module = C:\Program Files\Rockstar Games\GTA San Andreas\gta_sa.exe Code = 0xC0000005 Offset = 0x003C91CC EAX=0ED172C8 EBX=0ED172B8 ECX=0177FAA0 EDX=000A9518 ESI=00000000 EDI=00000001 EBP=0177FC50 ESP=0177FA80 EIP=007C91CC FLG=00010202 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000 Anyone can help me?
  24. Hello, I need help to complete a slow idle script for the vehicle, but I just could not get a good result, if you can help me, thank you! RX7_sound = { {"001.wav",494}, } function replacesound(player) for i,OBJ in ipairs(RX7_sound) do vehicle = getPedOccupiedVehicle (OBJ[2]) if vehicle then sound = playSound (OBJ[1],looped = true) setSoundVolume(sound, 0.5) setSoundMaxDistance(sound,25) end end end addEventHandler("onClientResourceStart",root,replacesound)
  25. I need help to create this script that replaces objects across a table, thus getting more practical and quick to convert objects Garage_OBJ_DFF = { {"garage_1.dff",1455}, {"garage_2.dff",1455}, } Garage_OBJ_TXD = { {"garage_1.txd",1455}, {"garage_1.txd",1484}, } Garage_OBJ_COL = { {"garage_1.col",1484}, {"garage_2.col",1484}, } function replacemodels(player) for i,object1,object2 in ipairs(Garage_OBJ_DFF) do table.insert(object1[1],object2[2]) object1 = engineLoadDFF object2 = engineReplaceModel end for i,object1,object2 in ipairs(Garage_OBJ_TXD) do table.insert(object1[1],object2[2]) object1 = engineLoadTXD object2 = engineImportTXD end for i,object1,object2 in ipairs(Garage_OBJ_COL) do table.insert(object1[1],object2[2]) object1 = engineLoadCOL object2 = engineReplaceCOL end end addEventHandler("onClientRender",root,replacemodels)