Jump to content

Search the Community

Showing results for tags 'settings'.

  • 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

Found 8 results

  1. Regeneration (health) This resource lets you regenerate player and vehicle* health. It is not an unique idea, I know... but there weren't good implementations for it at the community resource list. So that's why I share this with YOU. * Vehicle regeneration for the driver only. Version 1.0.0 Not compiled! Smooth health regeneration No UI, just the manager Settings (Admin panel) Settings Regeneration [on/off] (player/vehicle) Regeneration value (player/vehicle) Regeneration delay (player/vehicle) Regeneration [on/off] while the vehicle is burning Download link: https://community.multitheftauto.com/?p=resources&s=details&id=15757 Take a quick look into the source code (v1.0.0) Client Server Meta
  2. Hello, I'm trying to pass my server side settings defined in my meta.xml to the client. However, when passing the table of XML data to the client, the data does not persist. Here's my server side code: addEvent("onClientRequestResourceSettings", true) addEventHandler("onClientRequestResourceSettings", resourceRoot, function() local xml = xmlLoadFile("meta.xml") local settingsNode = xmlFindChild(xml, "settings", 0) if(settingsNode) then local settings = xmlNodeGetChildren(settingsNode) triggerClientEvent(client, "onServerProvideResourceSettings", resourceRoot, settings) end xmlUnloadFile(xml) end ) That above event is called client side when the resource starts. Here's the client side code: addEvent("onServerProvideResourceSettings", true) addEventHandler("onServerProvideResourceSettings", resourceRoot, function(theSettings) iprint("Settings provided: "..inspect(theSettings)) --Output: "Settings provided: { }" end ) However my settings table is not being passed to the client. When printing the output, it appears to be an empty table. I'm aware there is a limitation of passing xml data to the client, however as this is in fact a table data type, I wouldn't of thought there would be an issue? Can anyone point me in the right direction, or perhaps provide some better solutions for passing settings data from the meta.xml to the client? Cheers.
  3. Boa noite, novamente eu estou com varios projetos em mente, e estou criando eu mesmo por isso venho aqui no forum pedir ajuda, por que eu nao gosto de pega coisa feita, gosto de aprender com meus erros... Bom mais vamos la OPS: FIZ ESSE SISTEMA DO ZERO (AGORA MESMO FIQUEI 3 HORAS FAZENDO) Fiz esse Painel de radio, nele vai ter varios IP de radios.. o jogador seleciona a radio que quer e clica em Escutar Musica (botão), e a musica começa a toca e se quiser pausar ele clica no botão (Pausar Musica)... Só que no sistema se vc fica varias vezes clicando em "escutar musica" com ip selecionado começa a toca varias vezes a radio e buga, e nao da para pausar mais, outro bug é que ele seleciona todos os IP que esta na tabela da gaveta dele ["","",""] ai começa toca varias radio junto Podem me ajudar? GuiOpen = guiCreateWindow(60, 197, 400, 470, "", false) GuiTable = guiCreateGridList(21, 34, 358, 304, false, GuiOpen) Guiesta = guiGridListAddColumn(GuiTable,"Estação da Radio",0.60) Guilocal = guiGridListAddColumn(GuiTable,"Localidade",0.35) GuiButtonPlay = guiCreateButton(21, 355, 170, 54, "Escutar Radio", false, GuiOpen) GuiButtonStop = guiCreateButton(205, 355, 170, 54, "Pausar Radio", false, GuiOpen) TbaleMusic = { ["Radios"] = { {"Sound POP","Brasil","https://radiosoundpop.com.br/ouvir/windows.asx"}, {"Jovem Pan","Brasil","http://69.175.13.131:8280"} }, ["Generos"] = { {"RAP","Brasil","http://67.228.177.4:9944/"}, {"RAP 2","Brasil","http://69.64.56.11:8130/ "}, {"Funk","Brasil","http://96.47.227.156:9122/"} }, } addEventHandler("onClientGUIClick",getRootElement(),function(Guiesta) if source == GuiButtonPlay then if SpamTime and SpamTime + 7000 > getTickCount() then return else SpamTime = getTickCount() end local Lists = guiGridListGetItemText(GuiTable,guiGridListGetSelectedItem(GuiTable)) if Lists ~= "" then for i,music in ipairs(TbaleMusic["Radios"])do sound = playSound(music[3]) setSoundVolume(sound,1) alert("Você esta escutando: "..music[3]) end for i,music in ipairs(TbaleMusic["Generos"])do sound = playSound(music[3]) setSoundVolume(sound,1) alert("Você esta escutando: "..music[3]) end end elseif source == GuiButtonStop then local ListsStop = guiGridListGetItemText(GuiTable,guiGridListGetSelectedItem(GuiTable)) if ListsStop ~= "" then for i,music in ipairs(TbaleMusic["Radios"])do sound = playSound(music[3]) setSoundVolume(sound,0) end for i,music in ipairs(TbaleMusic["Generos"])do sound = playSound(music[3]) setSoundVolume(sound,0) end end end end) function refreshList () if(Guiesta) then row1,column1 = guiGridListGetSelectedItem(GuiTable) guiGridListClear(GuiTable) local rows = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,rows,Guiesta,"- Radios",true,false) for id,Radioss in ipairs(TbaleMusic["Radios"])do local Radiosssss = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,Radiosssss,Guiesta,Radioss[1],false,false) guiGridListSetItemText(GuiTable,Radiosssss,Guilocal,Radioss[2],false,false) end local rowss = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,rowss,Guiesta,"- Generos",true,false) for id,Radio in ipairs(TbaleMusic["Generos"])do local Radios = guiGridListAddRow(GuiTable) guiGridListSetItemText(GuiTable,Radios,Guiesta,Radio[1],false,false) guiGridListSetItemText(GuiTable,Radios,Guilocal,Radio[2],false,false) end if row1 and column1 then guiGridListSetSelectedItem(GuiTable,row1,column1) end end end Obrigado desde de já
  4. Wyppi

    Mouse sensitivity

    Hello. I changed mouse sensitivity settings at menu and put it to o%. But when i return to the game, there is an impression, that sensitivity is 100500%. So what can i do? P.S. Sorry for english.
  5. Hello everyone. I have a script with some settings that can be changed on Admin Panel, they are working fine without any error. The settings are declared on meta.xml like this: <settings> <setting name="*playerHouseCounter" value="[1]" friendlyname="Número de casas por jogador" group="General" accept="1-5" desc="Quantas casas cada jogador pode ter ao mesmo tempo." /> <setting name="*keyVipLength" value="[4]" friendlyname="Número mínimo de caracteres na senha" group="General" accept="1-10" desc="Quantos caracteres no mínimo devem ter as senhas das casas." /> <setting name="*vipACL" value="Vip" friendlyname="ACL Group VIP" group="General" accept="*" examples="Premium, VIP, vips, Payers, Pay2Play, etc" desc="Nome exato da ACL Group dos jogadores que são VIPs." /> </settings> BUT When I change a setting (from 1 to 2 as example), it appears duplicated with the new value, like this: In the script, I get those values with this: get( 'playerHouseCounter' ) How can I do this? This error doesn't happens with original resources.
  6. Olá novamente. Eu estou fazendo um script que possui configurações fora do script, aquelas configurações que vc declara no meta.xml e podem ser alteradas pelo painel admin. O script está tudo certo e as configurações estão funcionando. O problema é que quando eu altero qualquer valor de qualquer configuração, ele cria uma cópia dessa configuração com o novo valor e passa a utilizar essa nova configuração em vez da original, a configuração original continua com seu valor padrão e não é mais utilizada. Se eu tentar alterar o valor da cópia, ele cria uma terceira configuração cópia da cópia com este novo valor e assim por diante. Se eu alterar o valor na configuração original, ele aplica a alteração na cópia e mantém a configuração original no valor padrão. Se eu colocar o valor padrão na configuração original, nada acontece e a cópia não é alterada. As configurações estão declaradas assim no meta.xml: <settings> <setting name="*playerHouseCounter" value="1" friendlyname="Numero de casas por jogador" group="General" accept="1-5" desc="Quantas casas cada jogador pode ter ao mesmo tempo." /> <setting name="*keyLength" value="4" friendlyname="Numero minimo de caracteres na senha" group="General" accept="1-10" desc="Quantos caracteres no mínimo devem ter as senhas das casas." /> <setting name="*vipACL" value="Vip" friendlyname="ACL Group VIP" group="General" accept="Everyone,Moderator,Vip,Premium,Etc" desc="Nome exato da ACL Group dos jogadores VIPs." /> </settings> E acontece isso, quando eu altero por exemplo a configuração "Numero de casas por jogador" que originalmente é 1, dai eu alterei para 2: Obs: Já tentei declarar desse outro jeito mas continua com esse mesmo problema. <settings> <setting name="*playerHouseCounter" value="2" accept="1-9" desc="Quantas casas cada jogador pode ter ao mesmo tempo." /> <setting name="*keyLength" value="4" accept="1-9" desc="Quantos caracteres no mínimo devem ter as senhas das casas." /> <setting name="*vipACL" value="Vip" accept="Everyone,Moderator,Vip,Premium,Etc" desc="Nome exato da ACL Group dos jogadores VIPs, o grupo aparece no painel Admin ao selecionar um jogador VIP, do lado de Everyone." /> </settings> Obs2: Esse problema não acontece nas configurações do Scoreboard, resource original do MTA.
  7. I have a gun sight system, but it keeps warning me when I click to aim ('Mouse2') I did a function to see if the error was going to go I'm going to put the old script and what I did PLEASE WHAT SHOULD I DO? old bindKey("mouse2","down",function() Crosshair_table = {} if getElementData(getLocalPlayer(),"sight") then if oldSight and oldSight == getElementData(getLocalPlayer(),"sight") then return end defaults = dxCreateTexture(getElementData(getLocalPlayer(),"sight")) oldSight = getElementData(getLocalPlayer(),"sight") Crosshair_table = dxCreateShader("utilitarios/painel/texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", defaults) end end) I did bindKey("mouse2","down",function() Crosshair_table = {} if getElementData(getLocalPlayer(),"sight") then if oldSight and oldSight == getElementData(getLocalPlayer(),"sight") then return end if default then default = getElementData(getLocalPlayer(),"sight") else default = "utilitarios/painel/images/false.png" end local defaults = dxCreateTexture(default) local oldSight = getElementData(getLocalPlayer(),"sight") Crosshair_table = dxCreateShader("utilitarios/painel/texreplace.fx") engineApplyShaderToWorldTexture(Crosshair_table, "siteM16") dxSetShaderValue(Crosshair_table, "gTexture", defaults) end end) Warning that this is the one: bad argument @'dxcreateTexture' [expecte mumber at argument 2, got none] Thank you in advance;)
  8. Hi, I got a problem with the "settings" on my script. I set in the meta the following: <settings> <setting name="*skinsPrice" value="2500" group="Price" desc="Set the price of the skins." /> </settings> But when I try to edit the value I got this error: Basically, if I edit one, another setting is created with the value I set, and the old setting is not changed. If I use get() function like this: function saveSkinPrice (skinsResource) if skinsResource ~= getThisResource() then return end local currentSkinPrice = get("skinsPrice") --I use the setElementData to retrieve the value on client side setElementData(resourceRoot, "skins.price", currentSkinPrice ) end addEventHandler("onResourceStart", getRootElement(), saveSkinPrice) function updateSkinPrice(pricesetting, oldprice, newprice) --outputs for testing outputChatBox(pricesetting) outputChatBox(oldprice) outputChatBox(newprice) local currentSkinPrice = get("skinsPrice") setElementData(resourceRoot, "skins.price", currentSkinPrice ) end addEventHandler("onSettingChange", getRootElement(), updateSkinPrice) It retrieve the value from "iG_infernus-skins.skinsPrice" setting, making the setting "skinsPrice" useless. I can only use it to edit the "iG_infernus-skins.skinsPrice" setting, and that doesn't have any sense.
×
×
  • Create New...