Raised This Month: $ Target: $400
 0% 

[CS:GO] Give zeus to a certain flag


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FurYXO
Junior Member
Join Date: Feb 2018
Old 03-11-2021 , 15:05   Re: [CS:GO] Give zeus to a certain flag
Reply With Quote #5

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

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo =
{
    name = "Zeus for Custom1",
    description = "Zeus for Custom1",
    author = "Ervin",
    version = "1.0.0",
    url = "www.magyarhns.hu"
};

public void OnPluginStart()
{
    HookEvent("player_spawn", Event_PlayerSpawn, EventHookMode_Post);
}

public void Event_PlayerSpawn(Event hEvent, const char[] sEventName, bool bDontBroadcast)
{
    int userid = hEvent.GetInt("userid");
    
    if (IsClientInGame(GetClientOfUserId(userid)))
    {
        CreateTimer(0.3, Timer_Delay, userid, TIMER_FLAG_NO_MAPCHANGE);
    }
}

public Action Timer_Delay(Handle hTimer, int userid)
{
    int client = GetClientOfUserId(userid);

    if(IsClientInGame(client) && CheckCommandAccess(client, "faszarc", ADMFLAG_CUSTOM1))
    {
        switch (GetClientTeam(client))
        {
            case 2:
            {
                GivePlayerItem(client, "weapon_taser");
            }
            case 3:
            {
                GivePlayerItem(client, "weapon_taser");
            }
        }
    }
}
FurYXO is offline
 



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 05:38.


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