Thread: No Reset Score
View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-03-2010 , 18:46   Re: No Reset Score
Reply With Quote #10

Ok i made some research and this is what you should do :

1. Register the #Game_will_restart_in TextMsg as an event
2. In the event callBack set a global bool so you know later that the game is restarting

3. Register NewRound with HLTV event
4. In new round event, if the game is restarting, save gametime and save scores, because HLTV event is triggerer right before player spawn and scores are reseted in player spawn, or between HLTV event and Player Spawn, but all of this is procceded in the same frame and that is usefull for #6.

5. Register Spawn event with Ham (you could even enable it in HLTV event and disabled it later)
6. When a player spawn, if the gametime is the saved gametime, restore player score, if gametime doesn't match, unregister Spawn.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-03-2010 at 19:31.
ConnorMcLeod is offline