are you sure that you used the getframe condition that Vectar666 mentioned? impossible that your code is executed more often than one time that way (because getframe will return each number only once since the frame is increased each update cycle)
addgamemode("mymod","My OWN MOD")
functionmymod_gm_draw()-- Do nothingendfunctionmymod_gm_update()--this function is importent!if getframe()==1then---checks if the round started--your code hereendendfunctionmymod_gm_playerdamage()end
when you created this file and saved all you have to run the game --> host --> host--> right down corner "gamemode" click at the "+" til your name of the gamemode appears. Then start the map and you will see it works if you done everything correctly!
TimeQuesT,thank but i know and is not my first time to script with lua.
I have try getframe but the effect do every seconde.
EDIT:
For exemple i do this:
function waterdeaad_gm_update()
if getframe()==1 then
watery(math.random(-0.01,-0.001))
end
are you sure that your game mode is called waterdeaad with two a?
also see watery
the way you are using it seems pretty pointless to me (watery expects an absolute y-position for the new water level)
calling it your way will make it instantly flood the whole map. which probably makes you think that the command is called all the time. which is not the case.
that's impossible. I just tested it myself and it works perfectly fine if you are using the if getframe()==1 condition and the update function. it will only be executed once per turn.
you either didn't do it exactly this way or a strange super virus is messing with you! watch out!