Raised This Month: $51 Target: $400
 12% 

Request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BrainDead
Junior Member
Join Date: Dec 2020
Location: Anywhere
Old 12-30-2020 , 14:48   Request
Reply With Quote #1

hey, can anyone do the same for the team scores. Because the scores are reset to 0.
PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

new const Version[] = "1.2"

new Frags[33], Deaths[33], RestartGame
new Float:RestartTime
new HamHook:PlayerSpawn

public plugin_init() {
    
register_plugin("No Reset Score"Version"GlaDiuS")
    
    
register_event("TextMsg""RoundRestart""a""2&#Game_w"
    
register_event("HLTV""NewRound""a""1=0""2=0")
    
    
PlayerSpawn RegisterHam(Ham_Spawn"player""FwPlayerSpawn"1)
}

public 
NewRound() {
    if(
RestartGame) {        
        new 
Players[32], numuser
        get_players
(Playersnum"h")
        for(new 
0numi++) {
            
user Players[i
            if(
is_user_connected(user)) {
                
Frags[user] = get_user_frags(user)
                
Deaths[user] = cs_get_user_deaths(user)
                if(
Frags[user] || Deaths[user])
                    
RestartTime get_gametime()
            }
        }
        
EnableHamForward(PlayerSpawn)
        
RestartGame false
    
}
}    

public 
FwPlayerSpawn(user) {
    new 
Float:GameTime get_gametime()
    
    if(
GameTime != RestartTime)
        
DisableHamForward(PlayerSpawn)
    
    else {
        if(
is_user_alive(user)) {
            
set_user_frags(userFrags[user])
            
cs_set_user_deaths(userDeaths[user])
        }
    }
}

public 
RoundRestart() {
    
RestartGame true

BrainDead is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode