• Content count

  • Joined

  • Last visited

Community Reputation

9 Neutral

About Pirulax

  • Rank

Recent Profile Visitors

457 profile views
  1. Simple question

    Yeah, a friend of mine already told me. Nice to meet ya' btw Jay.[Im hungarian, just to give you idea why i said this.] @Jayceon

    Try to NOT use numeric indexes, as you will get lost, always try to use worlds as index, ex.: tbl.someIndex, but here you go: local vehTypes = { [442] = {--the index is the vehid stats = {4 ,1 ,1 ,1 , 1,0.25 ,50},--> i dont know what this table is, so i use numeric index. pos = { {x = 2433.3086, y = -1674.3926, z = 14.004364, rx = 0, ry = 0, rz = 0, 30}, {x = -2519.2705, y = -603.21094, z = 132.91457, rx = 0, ry = 0, rz = 0, 30},--> i donw know that the last thing is for. } } } for vehModellId, vehTypeDatas in pairs(vehTypes) do for _, pos in pairs(vehTypeDatas.pos) do createVehicle(vehModellId, pos.x, pos.y, pos.z, pos.rx, pos.ry, pos.rz) end end Or with the table you provided: vehicleTable = { { id = 422, stats = {4,1,1,1,1,0.25,50}, pos = { {2433.3086, -1674.3926, 14.004364,0,0,0,30}, {-2519.2705, -603.21094, 132.91457,0,0,0,30}, } }, } for _, vehTypeData in pairs(vehicleTable) do for _,pos in pairs(vehTypeData.pos) do createVehicle(vehTypeData.id, pos[1], pos[2], pos[3], pos[4], pos[5], pos[6]) end end
  3. BASS ERROR 2 in LoadMedia

    Hello. By default you cant even start MTA without a sound device.[Eg.: headphones, etc.].But if you start MTA, and disconnect the sound device, MTA will start throwing such errors every time it tries to play a sound.[with playSound, playSound3D]
  4. [HELP] How to make this effect with dx image?

    So you want to use the exact same .gif, but created with dxImage? If i know how to use shaders, its possible actually, pretty easily.
  5. problem because other servers

    Interesting.Since I think its a bug, theres is no real solution for it, only to put a bugreport on https://bugs.mtasa.com
  6. Simple question

    Hello, so im here with a simple question. So we have a function called 'executeBrowserJavascript', and i have a question with using this function.So, i have scripts[js] linked to a html file, which is loaded by a browser, the question is: Can i use the functions definited inside these scripts? Ex.: --> A browser is created, and a local page is loaded in it, the index.html has the following content: <!DOCTYPE html> <html> <body> <h1 id="playername">Your name</h1> <script type="text/javascript" src="assets/js/script.js"></script> </body> </html> and the script has the following function: function setname(name){ document.getElementById("playername").innerHTML = name; } and i want to call this function from lua like this: executeBrowserJavascript(browser, "setname('"..getPlayerName(localPlayer).."')" Is it possible?If not, is there any way to do such things?
  7. problem because other servers

    So, the player was on another server, were was a modell on an object, then he connected to ur server, and the same modell was loaded in the that specific object?Thats more likely a bug.
  8. Try settings the needed values (face towards) to the position of the vehicle.
  9. Vehicles that paintjob does not work

    You cant, but not all texture names are the same. Try using shader_tex_names . Just click on 'Texture names' on the top of the page. Btw, you should use getLocalPlayer() instead of resourceRoot. For some reason wiki says that resourceRoot is better, but in reality its much worse because of event faking. And why do u recreate the shader every time?
  10. Right Click target ped ID

    Stolen script?
  11. Retrieving data from mysql

    By the way, if you want to use built-in functions, then you should use them like this: dbQuery(function(qh) local poll = dbPoll(qh,0) -- timeout doesnt matter here, because the result will be ready always. for _,v in ipairs(poll) do local charid = v["charid"] print(charid) --< Prints the charid into the debugscript 3, note, this will be printed as many time as #poll is. end print(charid) --< Prints nil, since the variable 'charid' was created in the loop. end,{},con,"SELECT * FROM characters WHERE ownerid=?",ownerid) OR use this when you create an account, and want to retrieve the accountID of it. passwordHash(passwordEnteredByUserGoesHere,"bcrypt",{usr},function(pass,usr) --//** always use some encrypting algorithm. dbQuery(function(qh) local _,_,id = dbPoll(qh,0) -- timeout doesnt matter here, because the result will be ready always. print(id) end,{},con,"INSERT INTO accounts SET usrname=?, pass=?",usr,pass) end I hope you can understand what i wrote here, if not than drop me a pm.
  12. Ped shooting

    So, the code looks something like this: --Server code local ped = createPed(120,0,0,0,90) giveWeapon(ped,30) triggerClientEvent("someCreateiveEventNameHere",root,ped) --Client Code addEvent("someCreateiveEventNameHere",true) addEventHandler("someCreateiveEventNameHere",getLocalPlayer(),function(ped) setPedControlState(ped,"fire",true) end) If not, can you give us a code?
  13. Saving a character system to MySQL

    Very good explanation by @pa3ck here, congrats!Dropped you a like, i was about to explain the same, but then i saw ur comments
  14. failed to call 'fall_log:createLog'

    Yeah, this is when you are tired.....Thanks a lot Very amateur mistake by me. Dropped you a like (Reputation)
  15. failed to call 'fall_log:createLog'

    Did i forgot to mention, that i added them?Yeah, i added them. <function export="addLog" type="server" /> <function export="saveLog" type="server" /> <function export="createLog" type="server" /> I tried to use the function from server.