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

[CS:GO][REQ] Only Zeus Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Desnox
Junior Member
Join Date: Oct 2019
Old 05-24-2020 , 10:31   [CS:GO][REQ] Only Zeus Plugin
Reply With Quote #1

Hi i'm looking for a fully working only zeus plugin..

so the plugin will give everyone a zeus each round and if they kill the will get another zeus, but i if the don't kill or will only give damage to another player they won't get a new one.

i tried this but after someone kill it doesnt give them another zeus

https://forums.alliedmods.net/showthread.php?p=2351746

can someone fix this for me please
Desnox is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 05-24-2020 , 16:01   Re: [CS:GO][REQ] Only Zeus Plugin
Reply With Quote #2

Nothing should have been wrong with my post back then, it just didn't give tasers on spawn.

PHP Code:
#include <sourcemod>
#include <sdktools>

#pragma newdecls required

public void OnPluginStart()
{
    
HookEvent("player_spawn"Event_PlayerSpawnEventHookMode_Post);
    
HookEvent("player_death"Event_PlayerDeathEventHookMode_Pre);
}

public 
void Event_PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    if (
client && GetClientTeam(client) > 1)
    {
        
GivePlayerItem(client"weapon_taser");
    }
}

public 
Action Event_PlayerDeath(Event event, const char[] namebool dontBroadcast)
{
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    if(
attacker && IsPlayerAlive(attacker))
    {
        
char weapon[64];
        
GetEventString(event"weapon"weaponsizeof(weapon));
        if(
StrEqual(weapon"taser"false))
        {
            
CreateTimer(1.0Timer_GiveZeusGetClientSerial(attacker));
        }
    }
}

public 
Action Timer_GiveZeus(Handle timerany serial)
{
    
int client GetClientFromSerial(serial);
    if(
client && IsPlayerAlive(client))
    {
        
int equipped GetEntPropEnt(clientProp_Send"m_hActiveWeapon");
        
GivePlayerItem(client"weapon_taser");
        
EquipPlayerWeapon(clientequipped);
    }

Maxximou5 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 20:06.


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