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. Hello, my script is giving out the error "Expected element, got nil" but I tried everything and cannot manage to fix it function findPlayer( namepart ) local player = getPlayerFromName( namepart ) if player then return player end for _,player in pairs( getElementsByType 'player' ) do if string.find( string.gsub( getPlayerName( player ):lower( ),"#%x%x%x%x%x%x", "" ), namepart:lower( ), 1, true ) then return player end end return false end addCommandHandler( 'heal', function( source,_,player ) local find = findPlayer( player ) if find then setElementData(find, "healStatus", true) outputChatBox("The doctor is willing to heal you. Do you accept?", find) else outputChatBox("Player not found!", source, 255, 0, 0) end end) function acceptHeal() local requestStatus = getElementData(player, "healStatus") if requestStatus == true then setElementData(player, "healStatus" , false) -- delete it! setElementHealth(player, 100) outputChatBox("You have been healed by the doctor.", player) else outputChatBox("You have no pending request.", player) end end addCommandHandler("aheal", acceptHeal)
  2. Hello, I have the Following issue: I tried to set a variable to a getLocalPlayer but it just keeps returning nil value, why? My script is clientside so this is not the problem local player = getLocalPlayer ( )
  3. Hello, I made a script that makes player able to make a request to heal others but I couldn't get my script to work properly. function findPlayer( namepart ) local player = getPlayerFromName( namepart ) if player then return player end for _,player in pairs( getElementsByType 'player' ) do if string.find( string.gsub( getPlayerName( player ):lower( ),"#%x%x%x%x%x%x", "" ), namepart:lower( ), 1, true ) then return player end end return false end addCommandHandler( 'heal', function( source,_,player ) local find = findPlayer( player ) if find then setElementData(find,"healrequest", "pending") outputChatBox("The doctor is willing to heal you. Do you accept?", find) else outputChatBox("Player not found!", source, 255, 0, 0) end end) function acceptHeal() local requestStatus = getElementData(source, "healrequest") if (requestStatus == "pending") then setElementData(source,"healrequest", "unpending") setElementHealth(source, 100) outputChatBox("You have been healed by the doctor.", player) else outputChatBox("You have no pending request.", player) end end addCommandHandler("aheal", acceptHeal) the part with if requestStatus doesn't work, it just outputs all the time that the player has no pending request. How could I fix that and also make players unable to heal themselves?
  4. Hi guys! How to create vehicle and only admin acl group can enter the vehicle Fast help me☺
  5. Hi Guys Give me a resource for saving money, skin when player death and when player leave the server Give me a account data saver Thanks ❤
  6. Hello How to make players in ACL GROUP Admin color them red on the scoreboard?
  7. Hello, I have used the function setPlayerNametagColor to set the color of the player's nametag according to his ACL rank, but I would also like the color in chat to be changed as to grant more visibility to both staff and vip players. The problem is that I have been searching for similar topics but found nothing usable to start scripting such a function, so I would like someone to give me an idea of what to use in order to make that possible.
  8. كيف احفظ تواجد الاعبين او فلوسهم حتى لو رسترت السيرفر ؟ لانه لو كل شي ينعاد من الصفر الاعبين بيزعلو و يعتزلو السيرفر
  9. O problema que estou tendo, e não sei se é normal ou tenho que fazer alguma coisa é que o cenário ao fundo no servidor simplesmente vai sumindo e as coisas do nada nascem na tela, sim eu uso a distancia do horizonte tudo no full, foto de demonstração, tem algum script que ajude nisso e eu que fiz cagada sim ali é uma coisa adicional, mas o local nem ela estão bugados obrigado desde já <3 eu me mexendo um pouquinho mais pro lado aparece mais um pedaço e por ai vai mais fotos
  10. Boa Noite tudo bem to com um problema que quando entro no servidor aparece junto ao painel login o hud e o radar, eu queria que eles não aparecessem juntos, alguém pode me ajudar ?
  11. addEventHandler("onPlayerLogout" Function () if playervehicle then BlowVehicle (source) end بدي لما يخرج الاعب من السيرفر سيارته تنفجر او تنحذف عشان ما تكثرلي السيارات بلبداية و كودي مخرب تماما .. حد يصلحه
  12. I need a script for players who have weak PCs to disable textures
  13. onPlayerLogin setCameraMatrix setTimer createVehicle moveVehicle resetTimer شباب بدي متطلبات الانترو انا اعرف هذول و بس لاني جديد في البرمجه ساعدوني @Rakan# @Abdul KariM
  14. 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 ?
  15. 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 )
  16. 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
  17. --------------------------- MTA: San Andreas (CTRL+C to copy) --------------------------- There was a problem starting MTA:SA Direct3D CreateDevice error: 88760868
  18. 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)
  19. 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.
  20. 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
  21. 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.
  22. 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.
  23. Hello! I have question: "Is possible to create a rotation of image made by "dxDrawMaterialLine3D ?? "". Please fast return message.
  24. 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!
  25. 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( "http://us3.internet-radio.com:8313/listen.pls", 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( "http://188.40.32.140:8061/listen.pls", 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( "http://uk7.internet-radio.com:8040/listen.pls", 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( "http://83.142.226.45:25700/listen.pls", 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
×
×
  • Create New...