Raised This Month: $32 Target: $400
 8% 

Solved CS:GO Kill with Zeus and win the round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-20-2018 , 02:36   CS:GO Kill with Zeus and win the round
Reply With Quote #1

Hey, as the title says, if someone kill a enemy with the Zeus (weapon_taser) he will win the Round.
Thanks.

Last edited by iskenderkebab33; 11-03-2018 at 17:32.
iskenderkebab33 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-20-2018 , 04:18   Re: CS:GO Kill with Zeus and win the round
Reply With Quote #2

not tested
PHP Code:
#include <sourcemod>
#include <cstrike>

#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent("player_death"Event_Death);
}

public 
Action Event_Death(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
int iClient GetClientOfUserId(hEvent.GetInt("attacker"));
    
    if (
IsClientInGame(iClient))
    {
        
char sWeapon[32];
        
        
GetClientWeapon(iClientsWeaponsizeof(sWeapon));
        
        if (
StrEqual(sWeapon"weapon_taser"))
        {
            if (
GetClientTeam(iClient) == 3)
            {
                
CS_SetMVPCount(iClientCS_GetMVPCount(iClient) + 1);
                
                
CS_TerminateRound(7.0CSRoundEnd_CTWin);
            }
            
            if (
GetClientTeam(iClient) == 2)
            {
                
CS_SetMVPCount(iClientCS_GetMVPCount(iClient) + 1);
                
                
CS_TerminateRound(7.0CSRoundEnd_TerroristWin);
            }
        }
    }
    
    return 
Plugin_Continue;


Last edited by mug1wara; 07-20-2018 at 04:19.
mug1wara is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-20-2018 , 04:24   Re: CS:GO Kill with Zeus and win the round
Reply With Quote #3

Quote:
Originally Posted by mug1wara View Post
not tested
PHP Code:
#include <sourcemod>
#include <cstrike>

#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent("player_death"Event_Death);
}

public 
Action Event_Death(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
int iClient GetClientOfUserId(hEvent.GetInt("attacker"));
    
    if (
IsClientInGame(iClient))
    {
        
char sWeapon[32];
        
        
GetClientWeapon(iClientsWeaponsizeof(sWeapon));
        
        if (
StrEqual(sWeapon"weapon_taser"))
        {
            if (
GetClientTeam(iClient) == 3)
            {
                
CS_SetMVPCount(iClientCS_GetMVPCount(iClient) + 1);
                
                
CS_TerminateRound(7.0CSRoundEnd_CTWin);
            }
            
            if (
GetClientTeam(iClient) == 2)
            {
                
CS_SetMVPCount(iClientCS_GetMVPCount(iClient) + 1);
                
                
CS_TerminateRound(7.0CSRoundEnd_TerroristWin);
            }
        }
    }
    
    return 
Plugin_Continue;

thank you, gonna test it as soon as i can

EDIT: working fine. thanks!

Last edited by iskenderkebab33; 07-21-2018 at 15:47.
iskenderkebab33 is offline
Reply


Thread Tools
Display Modes

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 23:04.


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