No Reset Score
1 Attachment(s)
No Reset Score Version: 1.2 Descripcion: The score doesn't reset with sv_restart & sv_restartround Changelog: 1.0 - first release 1.1 - fix a bit the code... thanks exolent 1.2 - improved plugin... thanks Connor (L) PD: if you know any other name more shortly, please tell me |
Re: Don't reset score with sv_restart
1. Check if player is connected before getting frags and deaths.
2. A player could have a negative frags from killing a teammate. Code:
3. If player disconnects, remove the save variable. 4. When player spawn, check if alive first. |
Re: Don't reset score with sv_restart
Isn't it bad for a file to have spaces in the name?
I know it can cause file corruption in Adobe Illustrator files ( learned that the hard way in Comp. Graphics class... ). |
Re: Don't reset score with sv_restart
Quote:
2. ok 3. ok 4. ok thanks |
Re: Don't reset score with sv_restart
Quote:
|
Re: Don't reset score with sv_restart
thx yamikaitou (L)
|
Re: No Reset Score
Really nice idea, could you add a feature so timeleft doesnt reset?
And I suggest you to add a command to deactivate/activate the plugin, so if you want to reset score you will be able to do it. [ES] Copada idea, le podrias agregar para que no resetee el tiempo que falta para cambiar de mapa. Tambien te recomiendo agregar una cvar para activar/desactivarlo asi si queres resetear el score podes. |
Re: No Reset Score
There is absolutely no need to use register_message, use register_event instead.
Also, if restart is like 20 seconds later, people may have time to make frags, to die, even some players can spawn before the round restart, you may improve your plugin. |
Re: No Reset Score
thanks!
credits: TucanN# (IDEA) :P |
Re: No Reset Score
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. |
All times are GMT -4. The time now is 14:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.