Jump to content

Search the Community

Showing results for tags 'setelementdata'.

  • 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


About Me


Gang


Location


Occupation


Interests

Found 13 results

  1. function upLevel (thePlayer) for i,player in ipairs(getElementsByType("player")) do if ( player ) then if ( getPlayerAccount(player) ) and not ( isGuestAccount(getPlayerAccount(player)) ) then setElementData(player,"minutes",(getElementData(player,"minutes") or 0) +1) if ( getElementData(player,"minutes") > 60 ) then setElementData(player,"minutes",0) setElementData(player,"Level",(getElementData(player,"Level") or 0) +1) local bonus = math.random(650,1200)
  2. Estou fazendo um inventário no estilo desses Húngaros, porém como não tenho conhecimento nenhum sobre sql e pouco sobre tabelas, resolvi usar o bom e velho elementData. Porém ficou a dúvida se iria ter problemas em relação ao desempenho/processamento desses dados, pois teria slots para 20 itens diferentes nesse inventário e todos com os dados armazenados através de elementData. Eu teria problemas com isso? Se sim, a única saída seria usando tabelas?
  3. Estou com um problema, é o seguinte: Estou usando o setElementData, ele funciona perfeitamente para estocar o valor determinado. Porém quando o "source", o player sai do server como por exemplo dá "reconnect" esse valor estocado não fica salvo. Alguém tem ideia de como consigo fazer para salvar ? Desde já agradeço!
  4. Iae rapaziada, seguinte. Eu to fazendo um script que é divido em três partes a parte 1 (Carregamento), parte 2 (Entrega do produto) e parte 3 (Revenda ao consumidor final) o meu plano final é fazer trabalhos interligados! Porém no momento estou fazendo tudo junto o Entregador faz o carregamento e entrega ( a parte de revenda ainda não desenvolvi!). O meu problema esta sendo na hora de colocar o produto no caminhão em setElementData(CamiNaMarker, "Caminhao:ProntoPcarregar", DataCaminhao + 1) ( linha 77). O máximo são 20 produtos que o Entregador pode colocar dentro do caminhão então send
  5. Добрый день. Боги скриптеры, подскажите пожалуйста, после того как я создал setElementData или local money, нужно ли их очищать/удалять при дисконекте игрока? Спасибо за ответ
  6. First of all, sorry for bad English. I am creating a script and I used the getElementData function to get data stored in the user account and then the setElementData function to get the information through the getElementData on the client but the script has the following error in debugging: Bad argument @ setElementData [Expect element at argument 1, got nil] SCRIPT: [SERVER-SIDE] function setarDados_Entrar(source) local acc = getPlayerAccount(source) local habl = getAccountData(acc, "hablt") local ficha = getAccountData(acc, "fichacriminal") setElementData(s
  7. itHyperoX

    vehicle ID

    Hello, how can i make something thins? I want set id for each vehicle which is spawned. Then i can create /getcar command. I dont want to save this forever. local vehS = 0 function createVeh(player,CMD,veh) local vehName = getVehicleIDFromName(veh) local x, y, z = getElementPosition(player) if vehName == false then --- else vehS + 1 theveh = createVehicle(vehName,x+5,y,z) setElementData(theveh,"vehID",vehS) end end addCommandHandler("cv",createVeh)
  8. My problem is that it's not storing the data in the local mg = {}. The debugscript says: bad argumentum @ 'setElememtData' expected element at argument 1, got table Thanks in advance! function mg_pos() createMG(-2861.9, 19.4, 15.83, 0, 0, 188) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), mg_pos) --MG 1 local mg = {} function createMG(posX,posY,posZ,rotX,rotY,rotZ) local weapon_base = createObject ( 1897, posX,posY,posZ,rotX,rotY,rotZ) local weapon = createObject ( 356, 0,0,0) attachElements ( weapon, weapon_base, -0.55, 0, 0.75, 0, 0,
  9. Hello guys, for some reason debugscript is saying this..Heres my script piece: setElementData(p, "acc:admin", 7) if not getElementData(p, "acc:admin") > 0 then return end Nothing else changes acc:admin. Edit: Found the solution: setElementData(p, "acc:admin", 7) if not (getElementData(p, "acc:admin") > 0) then return end But, i still don't understand, so can someone explain me whats the difference between those code blocks?
  10. So I have a quick question regarding the setElementData function. While the wiki states that it can cause quite a bit of load on the net and server CPU I assume that this is only the case for server elements... What happens if I use setElementData on something that exists only on a client? Say a gui element or any kind of element that has been created on a client. Is the data still synced with the other clients or is it kept to the client the element exists on? 3aGl3
  11. Hi there, I want to make my server as safe as I can. So it is only logic, that I heed the advice from the wiki: Script security Well, the second part (with checking the validness of client and arguments) is very easy for me to do. But for the first part, I can only assume it works, but can't test it, as I don't have a hacked client. I don't want a real hacked client, but still, I would like to test, if a rouge client would get catched and reported by my script security (I only changed the "oputputConsole" to a error report system I already have implemented).
  12. Hi! This script makes possible to play a 3d sound (looped sound) by pressing the CTRL button, and stop the sound when the CTRL button is "up". Well, it has a really annoying sync bug. As you can see, there is a setElementData function in my client side script, that stores the sound element. When the player stops pressing the CTRL button then the script stops the sound with the stored element. Well the problem is that when another player press the CTRL button then the setElementData will be overwritted, and will cause really strange, annoying bugs. So the bug is: when player1 press CTRL, a
  13. السلام عليكم ورحمة الله وبركاته انا بفضل الله ثم بفضلكم عرفت اشياء كثيرة عن البرمجة لكني ما سألت قبل عن الداتا setElementData وانا نوب مرة فيها انا ابي اسوي داتا من ملف مثلاً يكون اسمه theData وابي اجيب الداتا في ملف آخر مثلاً getData لكن بشروط اذا الداتا حقت الملف الاول = الداتا حقت الملف الثاني يخرج كلمة في الشات : تم تثبيت الاضافة واذا الملف الاول لا يساوي الملف الثاني في الداتا تخرج رسالة اخرى تقول : لم يتم تثبيت الاضافة هذا اللي ابيه - اتمنى مساعدة
×
×
  • Create New...