Anderl
Members-
Posts
2,266 -
Joined
-
Last visited
Everything posted by Anderl
-
That won't work since "query" is nil.
-
Actually it does, because u created the same function name and an event As midas said, functions aren't events. Functions must have different names because overwriting - unlike some languages that can differ functions by its parameters, any previous function declared with same name as the function being declared is overwritten. Events aren't the same as functions. Functions are something from Lua language itself, event names are just a string to name events - event system is from MTA:SA, it's not something from Lua itself. Hope you got it.
-
Things you have done with loadstring unloads automatically when you stop the resource that used it. Hell, I didn't remember that resource code is saved in a new Lua state. If for some weird reason you need to unload some code while scripts still runs, my idea will still do the trick ( actually, it was qaisjp's idea for my download manager ).
-
That's very easy. Just make tables with name of all parts of SA and set them as country or city. Then use getZoneName and check.
-
I tried using it but it does not work. I therefore call examples, I already have tried everything and it does not work. My other option would be to delete the text and create a resource that can show the player in that position I'm seeing. Is not it could be done? That must be a joke.. Don't you just get it that it was an example code to show you how argument passing works and not a magic code for you?
-
I think that is wrong in this setElementPosition ( localPlayer,1679.3029785156,1446.3712158203,11.043098449707 ) Because it is where the spaces between the numbers http://lua.org
-
Just think for a while: There are no specific functions for doing CLEO mods. We can't guess what your CLEO mod will do either, just search on MTA Wiki for the right functions to re-create what the mod does and write the script. A function is a piece of code that can be called multiple times so that programmers don't waste time nor space writing million times the same thing.
-
I guess you need GUI element declaration outside of the event to use them in addEventHandler. I'm not using MTA/playing around with Lua in MTA anymore so maybe I'm wrong, but why not try. Btw, fadeCamera is not needed with setElementPosition since it already does that. I guess setCameraTarget is also not needed. Check for debug errors also.
-
No, the $2 service is the hosting. You still need to buy the license but it's just $10-$15/month and much better compared to the $50 probably-bad-scripted and not-too-cheap "panel" from delux-host.net. @MatthewFerris, where is TCAdmin more professional than GameCP?
-
You can't say much because your "company" sucks at all. Also, hosts ( or servers, whatever you want to call it ) aren't on a domain. Domains are names that point to specific addresses, hosts are the servers which domains points to.
-
Because you didn't hide it on resource start.
-
Just test it and you'll know? Btw, use local variables.
-
You copied this code from other script, didn't you? Because if it was yours, you'd know. Also, there are lots of undefined variables in the whole code. Btw, getPedControlState ( click to go to wiki ).
-
Mother of god. function test( arg1, arg2, arg3, arg4, arg5 ) --some code here end --Now I want to pass arg5 so I MUST PASS PREVIOUS ARGUMENTS: test( value, value, value, value, newValue ) -- 'newValue' is arg5's value
-
No, that makes completely no sense. Read Lua functions syntax and dxDrawText's syntax, you should fill all parameters till the one you need and you just write the value of the argument, there's no such thing like "colorCoded=true".
-
I doubt there's any. But what should be made is: create wrappers for functions that needs something stored and that thing should be removed when resource is stopped on an environment ( could be a table - with some modifications ) and then run loadstring on that environment. When you needed to remove things you just needed to delete things stored in any table inside the environment where things were saved. It's not hard.
-
Read what Kenix said first.
-
Wrappers, environments ( you can use Lua's setfenv or make your own environment "system" ) and unicorns.
-
I also used dxDrawText and does not work Set colorCoded argument to true.
-
Does the lag appears only in some( or one ) specific server(s)?
