
Gamesnert
MTA Contributors-
Posts
2,035 -
Joined
-
Last visited
Everything posted by Gamesnert
-
It seems like you're supposed to type something like: attachrotatingcamera(true,element,10,20) However, it won't work because this line won't do anything: element,Zoffset,distance=element,Zoffset,distance --(doesn't)make values global This should fix it, although I haven't checked for any other mistake in the code. -- EDIT ME local rotSpeed = 1 -- How much degrees you want the camera to turn per frame -- DON'T EDIT ME ANYMOAR local angle = 0 local elem local zOff local dist function getPointFromDistanceRotation(x, y, dist, angle) --credits to robhol from wiki snippets local a = math.rad(90 - angle) local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end function attachrotatingcamera(bool,element,Zoffset,distance) if bool then elem,zOff,dist=element,Zoffset,distance --make values global addEventHandler("onClientRender",getRootElement(),createRotRamera) else removeEventHandler("onClientRender",getRootElement(),createRotRamera) end end function createRotRamera() local x,y,z=getElementPosition(elem) local camx,camy=getPointFromDistanceRotation(x, y, dist, angle) setCameraMatrix(camx,camy,z+zOff,x,y,z) angle=(angle+rotSpeed)%360 end
-
Ehm, don't expect to get an answer in 3 hours, you'll end up disappointing yourself. It can take days for someone to notice your topic, who knows what the solution might be. Couple of questions: - What is your GTA version? - What is your MTA version? - What do you mean with "and at the left side i see some options from quit and it goes to quick ........"? - What popup screen does weird? And in what way is it doing weird? - Sometimes you see "the screen"? What screen?
-
1.0.3 rc 9? Why aren't you 1.0.3 released version yet? Or better yet, 1.0.4 untested builds? The problem *may* already be resolved.
-
Care to explain what exactly doesn't work about it?
-
Take a look at yours... Anyhow, as PacMan said, onPlayerDamage most likely won't work, because for as far as I know, health hacks put health back to the original value as fast as you get the damage, or disable it altogether. Could be wrong, but it makes sense in a way if you ask me. The only thing you can really do is adding some checks client-side to see if the player was hit by a bullet. If health doesn't go down, then there's most likely something like hacks stopping damage. I think onClientPlayerWeaponFire should do the trick. If the client player was the hit element and health didn't drop, there sure as hell should be something going on.
-
Care to explain what there bugs are? - Loading bug: What "loading bug"? - Downloading bug: What "downloading bug"? - GTA San Andreas background change: What is this supposed to mean anyway?
-
Please open your mtaserver.conf and read the commented parts. They're not there for nothing.
-
You don't have to login there. You just join a server and play. That's it. The service is, as the message suggests, down at the moment. It's (apparently) being fixed up. It's not required for now anyway.
-
Frankly, in no way is that making the slightest bit of sense to me. If you would set the alpha, it would still take up space, resulting in empty lines. Also, the alpha would change for everyone. For ranged that, the example on this page on the wiki should suffice really. Shouldn't you inform players instead of radically changing their font all of a sudden? And by the way, I can read Tahoma just fine. I'd recommend people who can't read it to buy a pair of glasses, really.
-
No need to apologize. I'm just pointing out that perhaps it might only bring in an undesired effect.
-
There is some kind of anti-cheat in MTA. The only times I've seen it though was at the times it was broken, and kicked players for random reasons. It does try to detect some cheats, but by far not all of them. Hacks not protected by AC: (for as far as I know) Projectile spam (creating rockets in some weird way) Airbrake Vehicle invincibility Godmode Things like flying car cheats etc All of these are possible to block with scripting, in theory. Like for projectile spam, onClientProjectileCreation should trigger. For flying car cheats, you should be able to use isWorldSpecialPropertyEnabled. For airbrake you could use a velocity check etc. etc. etc. @ karlis: What kind of hack is your example supposed to protect the server from? For as far as I know, weapon hacks aren't synced in MTA. (I could be wrong, but I'm pretty sure I'm not) Therefore, neither the server nor other players will see the hacker with a gun in his hands. The only problem I can come up with are rocket launchers, because projectiles are synced. However, banning the entire weapon is not really an effective way to get rid of this, because as I said before, it's not likely the server would even know the player has the weapon. So you'd only ban player which have got it in a proper way. There should rather be a check when a rocket was launched, to see if the player should actually be able to launch a rocket.
-
Just try not to use client-side money, except for display and perhaps a check. As lil_Toady said, server-side money functions are unaffected by money hacks, and therefore players can't hack it if you've thought it through correctly. I really don't recommend doing anything with money, except for getPlayerMoney itself, client-side. If you then want to do something with the money client-side: Check if the player has enough money with getPlayerMoney client-side Trigger a server event Check the money server-side If the player has enough money, do what you want to do If the player does not have enough money, don't do what you wanted to do and display an error message to the player That's it. The server-side check is important for detecting the hacks, but you shouldn't kick/ban if the client-side money values are wrong. It could be that due to a non-hack related way the money got the way it is right now, for instance perhaps the player pressed a "Buy" button twice, and doesn't know about having less money yet at the second time the player pressed the button. Also, as being said, and I will repeat: Money hacks are harmless if you protect your server correctly. And they also won't work if you don't use money in client-side scripts at all. There is no point of kicking/banning them over a hugely failed hacking attempt. (IMO)
-
I haven't tried the script yet. However, looking at the Lua code: 1. Don't use relative GUI positions sizes. They usually fuck up under different screen resolutions. (like XX3 noted) 2. Why are you saving animations in a .map file? You could use an XML file for this, which you don't need to send twice if the player reconnects. 3. Make a default file including all animations listed on the wiki. Should be very useful.
-
There is no "right" conclusion, there's just your opinion and/or way of doing it. You have to take a look for yourself and see what you think is more important.
-
Editing the script which you can't seem to edit. Just ask the creator if you can come to some sort of agreement.
-
If you cancel the onPlayerChat event, the original message won't appear. Otherwise you'll get something like: See the Cancel Effect part on the onPlayerChat page on the wiki.
-
With this, I think you mean scaling the text down a little. This is already possible in the MTA Main Menu -> Settings -> Chatbox. Edit the "scale" parameters. (the ones which are 1 x 1 by default, change them to 0.8 x 0.8 for 80%) Increasing the size of chatbox X coordinate means making it wider, I guess? For that, use the width parameter right underneath the scale option. Why? Tahoma looks fine. Apparently, lil_Toady has already made a chatbox resource which works exactly like the MTA chatbox. With the new function getChatboxLayout (which will come in 1.0.4 / 1.1) it should be possible to entirely remake the client's chatbox using the client's chatbox settings, and introduce some features of your own. I really don't see what for. You want to make invisible text messages or something? This can really wait, because for this a resource could be used like the previous point.
-
onClientPlayerDamage / onPlayerDamage returns the original damage value, nothing you can do about it except for editing it.
-
In votemanager.zip, open the meta.xml file and edit this: <setting name="*votemap_enabled" value="[true]"/> <setting name="*votemode_enabled" value="[true]"/> Then save and restart votemanager.
-
Look up "general.http" in your ACL file. Give rights to it to whoever you want. Note though that this also allows them to access stuff like webadmin; So be sure to stop webadmin or block them from accessing it using httpRequestLogin. (Note: This function has to be used in HTML files, NOT LUA)
-
It is exactly as name suggests. Anyway, webmap should be on your server by default. Type "start webmap" in your server console and connect to your server through your internet browser: (not MTA itself) http://: For instance, if running a local server with HTTP port of 22005: http://127.0.0.1:22005 You should connect to the server, and you should now be prompted to enter your username and password. Enter the username and password of an account with admin rights in-game. Now look on the left of the screen, there should be something called "webmap" there. Click on it and there it is, you can now see where everyone is on your server without being on it.
-
Does GTA SA itself support this feature to begin with? And for the ones who don't know what Eyefinity is: Eyefinity at Wikipedia
-
What about string.find? http://lua-users.org/wiki/StringLibraryTutorial Scroll down a little. Seems like it's pretty much identical.
-
Debug it, check what xmlCreateChild returns.
-
Explanations, big or small, the Wiki has it all.