Hello.
Using onPlayerDamage(attacker, weapon, bodypart, loss), for example when I have 100hp and shot near me with rocket launcher, loss is 75, but if I have for example 50hp and shot rocket launcher, loss is 50(because thats how much HP I have). How to get same 75 loss/damage with low hp, because rocket launcher does that damage?
I know that loss could not be more than I have HP, but maybe there is a way to get real damage that weapon does despite HP I have ?
Im using async version of the function passVerify. How to pass some parameters to callback which is called after passVerify function completes?
As for now I have:
function someFunction()
passwordVerify( password, hashedPassword, {}, passVerificationComplete )
end
function passVerificationComplete(matched)
if matched then
-- passwords matched
else
-- passwords mismatch
end
end
in "passVerificationComplete" parameter "matched" is the value which is true or false, depends on what passwordVerify returned, how to pass some other parameters to passVerificationComplete callback? Something like this:
function someFunction()
passwordVerify( password, hashedPassword, {}, passVerificationComplete(someOtherParam) )
end
function passVerificationComplete(matched, someOtherParam)
if matched then
outputDebugString(someOtherParam)
-- passwords matched
else
-- passwords mismatch
end
end
if getElementData(source, "wwacc.timesSpawned") == nil or getElementData(source, "wwacc.timesSpawned") == false then
setElementData(source, "wwacc.timesSpawned", 0)
end
local timesSpawned = getElementData(source, "wwacc.timesSpawned") + 1
setElementData(source, "wwacc.timesSpawned", timesSpawned)
Here ya go
After ~20 minutes of playing MTA quit's automatically. I've had this on zombie infestation server and on XIII(this name if I'm right).
On my local server I haven't that problem.
Is it possible to fix ?
Absolute for all? Even GUI window ? o_O
When one time before I used absolute values, they fit just to that screen, on which I created dialog. On others it was totally different and messed up.
Here is the code: http://pastebin.com/0BuP3Xbs
http://pics.lt/images/mta-screen%202010 ... -11-11.png (1024x768 screen)
http://pics.lt/images/mta-screen%202010 ... -12-36.png (1152x864 screen)
http://pics.lt/images/mta-screen%202010 ... -17-08.png (1280x1024 screen)
Look at all screen size pictures, as you can see everything is going of it's places. For example look at radio buttons at 1024x768 and 1280x1024, big difference right?..
All GUI created with GUIeditor on 1024x768 screen, everything is relative position's)
Is it possible to do something that GUI won't be so different on different screen sizes?(I thought that relative positions for all elements would do the work, but difference still exists )
I've using setCameraMatrix() in food shop to see sales-man in first person view. Then I showing GUI window where player chooses what he want's to buy. Food increase health, so I wanted HUD that player see how much HP he have. Maybe I insert label in GUI window with "Current health: [HP HERE]"..
How I can redraw HUD using dx functions ?