Gallardo9944
Members-
Posts
442 -
Joined
-
Last visited
Everything posted by Gallardo9944
-
I'm not sure if it's the game bug, or just the code flaw, but you could try reporting that at bugs.mtasa.com and see what developers can suggest or do.
-
difference between createObject server and client
Gallardo9944 replied to ALw7sH's topic in Scripting
Serverside has to sync every element and every its data to every single player. Clientside doesn't do that (because the object exists only in the client) so it is more efficient to use it. The only drawback is that you have to build the objects every single time the player reconnects. -
This always happens by default if mysql is installed on a VPS.The problem is that your mysql is bound only to localhost, meaning that you can't connect to the server from the outer world. You need to edit your mysql config file (should be /etc/my.cnf, correct me if I'm wrong - I'm typing this on my phone) and comment the line which is similar to bind_address = 127.0.0.1. Then restart your mysql server and you should be able to connect after that.
-
I'm pretty sure you can simply get all the players again when the resource starts.
-
userdata should be your element. If it's vehicle, get the player via getVehicleOccupant, if it's player, just get the name via getPlayerName.
-
Scripting isn't a work of copy-pasting. The tutorials on wiki are pretty clear though. But if you desire to just copy, here is the suggestion given:
-
You defined it when you created your IPB forum. (MySQL login, password, database, prefix) As far as I remember, there should be a config.php in the folder of your site with all the required details. P.S. Happy new year
-
You should connect to your SQL database IPB is connected to. The table should be something like ipb_members. The example of getting password hash, salt, etc (use in your dbQuery): SELECT salt,password FROM ipb_members WHERE member_name='HyPeX' (I'm not saying that those are the real column names, cause I switched to SMF a year ago) Usernames are unhashed, of course, you use them to define what account you're checking. If you want to get data,you can simply save the account name when the user logs in, and use SQL queries to get required information: SELECT something FROM ipb_members WHERE member_name='HyPeX' (replace "HyPeX" with your saved account name) If you want to change some data, you can simply do it like this: UPDATE ipb_members SET something='anything' WHERE member_name='HyPeX'
-
You don't really have to use PHP stuff to check if a user wrote the real password or not. You can get account name's salt and password hash and check it in Lua like this: function lowermd5(val) return string.lower(md5(val)) -- return the same md5 function, but with lowercase end local hash = lowermd5(lowermd5(salt)..lowermd5(password)) -- this is how IPB hashes passwords. salt is taken from IPB's database, password is taken from user input if hash == mysqlhash then -- if the hash from IPB's table matches our calculated one, then the user wrote the real password - auth successful else -- wrong password, m8 end string.lower is required because MTA's md5 hashing returns upper case values, but IPB hashes that in lower case. I've been using this method for a really long time, works perfectly and without exceptions. Make sure you escape possible SQL injections in name+password fields for security reasons.
-
playersTable[source] = nil ^ works only when you used something like this before: playersTable[source] = true If you have an indexed table, as Solidsnake14 pointed out, you have to remove that only by its position in the table. If you want to communicate with the table by the elements and not by IDs, you could better use the way of playersTable[source] = true. In other cases, you can loop through the table and remove the required position: for i,v in ipairs(playersTable) do if source == v then -- if there is such element table.remove(playersTable,i) -- remove it from the table according to its index end end ^ this way is not really recommended, but works in case you want to know how it is made.
-
Having a unique model for each element is not possible in current MTA version. You can try to do something with vehicle variants though, but i'm not able to help with it.
-
Of course it would probably cause problems, because you're not supposed to open the same file without closing it. Happy new year btw
-
Not really. If a file is not written yet, the song will simply be unsaved. If you disconnect while the file is being written, it will still finish the process.
-
How to convert object from GTA IV to San Andreas ?
Gallardo9944 replied to [XP]~Cnosi~>'s topic in Scripting
ini is a config file apparently. If you want to convert a model, you should consider using any 3D Modelling application like Blender with an addon for DFF import/export support. Import one model and export another. TXD textures are made manually though, you should check the names of textures in the model and add required textures using TXD Workshop. -
Try using latent events to transfer the file itself. Should work properly.
-
Hello. I'm trying to compile ml_base on Wheezy. This is what I'm getting after doing "make" in the module dir: gallardo@er-mta:~/ml_base$ make gcc -g -MD -Wall -I./ -m32 -c -o CFunctions.o CFunctions.cpp gcc -g -MD -Wall -I./ -m32 -c -o CThread.o CThread.cpp gcc -g -MD -Wall -I./ -m32 -c -o CThreadData.o CThreadData.cpp gcc -g -MD -Wall -I./ -m32 -c -o ml_base.o ml_base.cpp gcc -g -MD -Wall -I./ -m32 -fPIC -shared -Wl,-soname,ml_base.so.1,-R./ -o ml_base.so ./CFunctions.o ./CThread.o ./CThreadData.o ./ml_base.o -lpthread -lstdc++ -llua /usr/bin/ld: skipping incompatible /usr/local/lib/liblua.a when searching for -llua /usr/bin/ld: cannot find -llua Any solutions? Thanks. lua5.1 is installed, so are all the things for building default mta server
-
Instead of updating it every frame, you could draw it in your render target and update it only when it actually changes. That would save some frames if it doesn't change very often.
-
Have you tried to make them load slower? Make it change 10-15 textures a second, so you can track where it fails.
-
Hello. I'm experiencing the same problem with vehicle models, infernus in particular. Could you please provide some information on fixing this?
-
You can create collisions 50x50x50 for every zombie and use that for checks
-
Clientside banlist isn't a great thing to do. People would have to download banlist every time, in addition to that banned players might have some seconds (or minutes, depends on a download) of freedom before resources are loaded.
-
This is completely optional and I use it only if I have renders across resources. If it's in 1 resource, I just put things in the requested order: from the bottom to the top, as TiM3 said.
-
You can set onClientRender priorities for that. Higher priority = under everything (executes first), lower priority - over everything (executes last). This is the way it works: local renderUnder() -- First Layer end addEventHandler("onClientRender",root,renderUnder,true,"high+5") -- "high + 5" is an optional value if you need more layers like that, you can simply use "high" without any problems. local renderMiddle() -- Second Layer end addEventHandler("onClientRender",root,renderMiddle) -- We don't change it because it has "normal" priority already. function renderOverlap() -- Third Layer end addEventHandler("onClientRender",root,renderOverlap,true,"low-5") -- The most top layer. Same as first one, -5 isn't necessary and it's used when you really need to. That's just an example. You can split them around all resources, start whenever you want, change timing when render is added, but the layers will still look as they should.
-
[HELP] how to draw text on WORLD and not SCREEN
Gallardo9944 replied to joaosilva099's topic in Scripting
On the other hand, if you want to give full rotation and 3G abilities to your text, you might consider creating a render target and drawing the shader. -
How delete hunter top times from registry.db ?
Gallardo9944 replied to [XP]~Cnosi~>'s topic in Scripting
Use sqlite browser and remove these tables / database. https://community.multitheftauto.com/in ... ils&id=495
