AcidDK
-
Posts
29 -
Joined
-
Last visited
Posts posted by AcidDK
-
-
Things like that only happen in the states... When do you learn that guns shouldn't be something everyone can get?
-
it only works well up to a certain ping (not sure exactly what ping but i believe it to be around ~150) then you have to shoot infront a little
Interesting. That has to be tested. I'll test it when I have time and post the results here on the board. It might become useful for servers with ping kickers.
-
It's scriptable.
-
Nah keep it as it is.. That way it's more Hitman-like
-
It's a GTA bug.. Just Alt + Tab away from MTA and back again. Then it works.
-
I already use this for the mini map in the corner, and I'll definitely use it for the radar map too.. Thanks!
-
if you need any help with scripting don't hesitate to ask
I like to figure things out myself, but when I'm totally lost I'll ask. I'm the scripter btw.
-
i cant figger out how destroy the element on my client script though could u give a example
Well.. store the element in a global variable and destroy it with destroyElement when needed?
-
I'll try and see.. Anyway, the reason why I wrote "if 0.0 < tmpLoss < 5.0" and not "if 0.0 < tmpLoss and tmpLoss < 5.0" is that you can do so in Pawn, C/C++, Visual Basic, PHP etc. I'm already getting tired of LUA's limitations. I'll be back soon with the results.
EDIT:
Okay your solution worked. I'm both happy and disappointed. I'm happy because I now don't have to worry about it anymore and I'm disappointed because LUA sucks ass
Anyway, thanks for your help mate
tell us some of the limitations and we may be able to help
Nah you're not the ones working on the LUA language. I'll just have to get used to it.
-
I just made an example on wiki guiCreateStaticImage page:
Yeah that's what I already have done, which doesn't work.
-
Hi.
I've been all over the wiki and this board now, and I can't find out how to create images and show them in game. Can some one possibly make a short guide for it?
Thanks in advance.
-
The first thing is a GTA issue, not MTA.
Anyways, I have the solution for it. You don't have to close and reopen the game in order to make it work. It happens because MTA is partially out of focus (don't ask me how ), and it can be fixed by Alt + Tabbing a few times until you get it right. It's about Alt + Tabbing away from the MTA application (I know you can't minimize it but that's not what I'm saying either) and back again. If your eyes are fast enough you can see the Windows Alt + Tab application for some miliseconds.
-
uhrm shouldn't that be..
function addRednessOnDamage(pID,loss) fadeCamera(pID, false, 1.0, 255, 0, 0) local tmpLoss = tonumber(loss) [color=#FF0000] local tmpNumber = nil[/color] [color=#FF0000] if 0.0 < tmpLoss and tmpLoss < 5.0 then[/color] tmpNumber = 150 [color=#FF0000] elseif 5.0 < tmpLoss and tmpLoss < 15.0 then[/color] tmpNumber = 250 [color=#FF0000] elseif 15.0 < tmpLoss and tmpLoss < 40.0 then[/color] tmpNumber = 450 elseif 40.0 < tmpLoss then tmpNumber = 700 else tmpNumber = 150 end setTimer(fadeCamera, tmpNumber, 1, pID, true, 0.5) end
also when you have local variables inside an 'if' they will be lost once it goes out
I'll try and see.. Anyway, the reason why I wrote "if 0.0 < tmpLoss < 5.0" and not "if 0.0 < tmpLoss and tmpLoss < 5.0" is that you can do so in Pawn, C/C++, Visual Basic, PHP etc. I'm already getting tired of LUA's limitations. I'll be back soon with the results.
EDIT:
Okay your solution worked. I'm both happy and disappointed. I'm happy because I now don't have to worry about it anymore and I'm disappointed because LUA sucks ass
Anyway, thanks for your help mate
-
Huh, well that's odd. Can you round the number to be an integer (with math.ceil() or math.floor())? I'm speculating MTA somehow reads it wrong because of the dot in the middle of that number.
I've tried that in another situation just like this one (getDistanceBetweenPoints3D and comparing the same positions gives a value of 0, which it also understands as a boolean), and it didn't do any difference. Either way it would, logically, still be misunderstood by MTA if the float is rounded up/down to 0 or 1 as false or true.
-
tonumber(loss) prolly returns false or something. Try this:
outputChatBox( tostring(tonumber(loss)) )
And see what it outputs.
The first thing i tried was doing it without the "tonumber" function.. That is why I tried with "tonumber" and it made no difference. I was just too lazy to remove it. I'll try and do as you say anyways
EDIT:
Okay here are the results (I printed it instead of putting it in the chatbox):
Printed "5.5999984741211" with print(tostring(tonumber(loss))).
The error is still "attempt to compare boolean with number" on the 28th line which is where I'm comparing loss to a float the first time.
-
I'm not the only one experiencing this problem.. Here's some snippets of code from the game mode:
function addRednessOnDamage(pID,loss) fadeCamera(pID, false, 1.0, 255, 0, 0) local tmpLoss = tonumber(loss) if 0.0 < tmpLoss < 5.0 then local tmpNumber = 150 elseif 5.0 < tmpLoss < 15.0 then local tmpNumber = 250 elseif 15.0 < tmpLoss < 40.0 then local tmpNumber = 450 elseif 40.0 < tmpLoss then local tmpNumber = 700 else local tmpNumber = 150 end setTimer(fadeCamera, tmpNumber, 1, pID, true, 0.5) end
function Script_onPlayerDamage(attacker, attackerweapon, bodypart, loss) addRednessOnDamage(source,loss) end addEventHandler("onPlayerDamage", getRootElement(), Script_onPlayerDamage)
It's supposed to make the camera fade for a longer period of time when losing more health at once.
-
Hi.. I'm making a game mode for MTA and I've run into a problem. LUA can't tell the difference between boolean values and integers/float values.
In a function for the event onPlayerDamage I'm comparing the health loss to some float values.. like:
if loss < 10.0 then print("loss is under 10") end
This is not an example from my game mode, though this is how I do basically. When the server executes that piece of code I get an error saying that I can't compare a boolean to a number. In some way LUA thinks that the loss parameter is a boolean value, but when I print it in the console it really is a float value, like 0.32452. It makes no sense to me, and I figured there might be some experienced LUA users on this board who has some great work-around for this.
Thanks in advance for your help!
-
I have the same problem but it's not something MTA can fix.
-
Nice
-
AFAIK this is a bug in the game mode, not MTA itself.
-
and when is dp2 going to come out?
Before Christmas, year unknown
-
Fire is not synced in MTA.
-
Please don't limit it for everybody.
I personally think that it sucks with an fps below 40. It lags like shit. People with sucky pc's must admit the fact that they have a sucky pc or buy a new one. They shouldn't complain about others have an advantage just because they pc can't run GTA SA properly.
-
Well, I thought that you had to script the spectating mode yourself. I thought that was why - on some servers - that it doesn't work properly.
Resource center
in Client
Posted
I can't access mtabeta.com.. Are you updating anything?