ixjf
Members-
Posts
647 -
Joined
-
Last visited
Everything posted by ixjf
-
([email protected]) has joined http I don't know how I had this on my clipboard, but who cares.
-
It's not about what we like, it's about how you structure the tutorial and your non-properly working code. This section is for experienced scripters to share their knowledge, not for beginners who just finished reading a tutorial - if you don't know, don't make anything whatsoever. Limit yourself to learning, instead of filling this section with yet another bad "tutorial", don't make this worse than it already is. If you want to make something, do it properly. This is a proper tutorial: https://wiki.multitheftauto.com/wiki/Tu ... /PM_System (Isn't this section also only for Lua? - It is on the Lua scripting help board, makes no sense to have unrelated tutorials on that section.)
-
The share option doesn't magically share variables across Lua virtual machines, the only thing it does is re-use the active connection instead of connecting to the server again.
-
RW model binary stream files only contain models, as it says - effects are usually in FXP files.
-
He shouldn't actually just close it, connecting every time the function is called is not a very cool idea whatsoever.
-
What's the problem with double-clicking an object and selecting the dimension?
-
It's not like we're still in the '80s, technology evolves quickly. You can see this motherboard, it supports 512GB of total RAM: http://www.asus.com/Commercial_Servers_ ... ifications
-
Sobre o jogo sendo detetado como vírus: A causa é, obviamente, devido aos métodos usados no mod para "injetar" os módulos no espaço do adereço do jogo, portanto, a resposta pequena é, não há vírus nenhum - se as mensagens de vírus forem irritantes para você, desative-as para o MTA (penso que o Avast, pelo menos, tem essa opção?).
-
In fact, the game itself for XBOX 360 and PS3 was leaked. Rockstar Games is doing whatever they can to shutdown all live streams and information leaked but many people already got their hands on the ISO, although R* says they will ban any console which contains anything related to Grand Theft Auto V.
-
You need to improve some aspects in your function, namely variables (local variables are recommended) and concatenation (table concatenation is faster).
-
An event can be bound to the function, the function handles the event. The event name is pretty much like an identifier to the handler when you're triggering it. An example of how return works: local function main() local received = MessageHandler:GetSingleton():GetMessage() while ( true ) do if ( received ) then if ( received == MESSAGE_QUIT ) then -- this will halt the function and return to the caller -- in this example, this is the entry point, and the caller should have been the host program (the one who runs Lua, e.g. MTA) return end MessageHandler:GetSingleton():HandleMessage(received) received = MessageHandler:GetSingleton():GetMessage() end end end ... function MessageHandler:GetMessage() -- some code here to get the message -- now you return the message, this returns to the caller with the message -- if you check the function 'main' above, you'll see it expects the function to return that message return message end All of this doesn't really make much sense (the main function could have been done in a more logical way but it would not make use of the return keyword which was the point of this example), but it should have been enough to understand this.
-
You can print with = on the Lua interpreter (not on the online Lua demo).
-
There always is. How do you expect the function bound to the event to be called?
-
No, I said the caller of the function.
-
bandi94, that's called caller, not parent. The return keyword halts the function and returns back to the caller, with or without any data.
-
and how did you know is that Linux?! Because of the "var" directory and the fact that it mentions ELF headers. For the latter problem, it's not the same. You're missing a library on the system, I recommend you talking to the support so they can solve the issue.
-
You can't use Windows 32 libraries on Linux.
-
I'm not sure, but you're probably very lucky if 0.5.1 is released this year
-
Hashed passwords aren't meant to be "de-hashed". You need to hash the password written by the client and compare it to the one in the database.
-
In fact, there's no real difference whatsoever, it is just my coding style.
-
I wrote a function which hashes a string and automatically creates a random key (salt) for you. It's pretty simple, and you can also provide your own salt generator function to use instead of the built-in one: function md5_salt(str, static_salt, salt_func) assert(str, "You need to pass a string to hash as first argument!") local salt__new = salt_func if not salt__new then salt__new = function() math.randomseed(getTickCount()) local salt = {} for i = 1, 80 do salt[i] = string.char(math.random(126)) end return table.concat(salt, "") end end if not static_salt or static_salt:len() == 0 then outputDebugString("md5_salt: It is recommended that you use a static salt.") static_salt = "" end local salt = salt__new() return md5(("%s%s%s"):format(str, static_salt, salt)), salt end Example (using static salt with built-in salt generator): local hash, salt = md5_salt("I'm an awesome string.", "in| {}D(p?ok+9UzVi:_'UTG{[s")outputChatBox("Hash: " .. hash)outputChatBox("Salt: " .. salt) Another example (using static salt with a different salt generator function): local function salt__new() math.randomseed(getTickCount()) local salt = {} for i = 1, 20 do salt[i] = string.char(math.random(63) * 2) end return table.concat(salt, "")end local hash, salt = md5_salt("I'm an awesome string.", "in| {}D(p?ok+9UzVi:_'UTG{[s", salt__new)outputChatBox("Hash: " .. hash)outputChatBox("Salt: " .. salt)
-
Perhaps we'll finally have a proper tutorials section, unlike the current one full of crap. BTW, I have fixed an issue in the outputChatBox call saying the player doesn't exist, variables were messed up.
-
I suppose you can overwrite or disable the chatbox 'T' key bind and re-draw the text box to allow anything you want. Alternatively, you can disable the chat box altogether and draw your own. MTA doesn't support loading custom animations at the moment, unless there are any built-in animations for it, you'll have to wait (it once did, but it was removed due to issues caused by it and I suppose it's still being worked on).
