Closed MrROFLMAN closed 8 years ago
@Hainaa Please don't do this. What do you think are Hooks even used for? They exist so you don't have to edit the gamemode itself but rather can append your own code with a hook in a custom addon or something like this.
I created #27 just for this reason a while ago. In hooks_and_convars.txt the hooks used are described further. You can simply replace the builtin mapvote system with your own by doing something like this:
hook.Add("DeathrunStartMapvote", "Start map voting", function(rounds)
DR:ChatBroadcast("Starting mapvote after playing "..rounds.." rounds!")
MAPVOTE:BeginVote() -- KMapVote starting method
return true
end )
Note that you have to return true
in order to prevent the builtin one from starting.
Cheers
Thanks SunRed, you're method worked! Trying to work out that issue for days now, thanks for the support guys!
Maybe i'm misreading something here, but I cannot get any map vote system to work on this gamemode other then the one provided with the gamemode, any ideas why this is happening?
I'm using kmapvote if that helps.