Raised This Month: $47 Target: $400
 11% 

[CS:GO] Give zeus to a certain flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lemmon_cs
Member
Join Date: Jan 2019
Location: Romania
Old 02-02-2021 , 00:58   [CS:GO] Give zeus to a certain flag
Reply With Quote #1

I need this plugin , If i player has flag CUSTOM1 he will get a free zeus every spawn , thanks.
lemmon_cs is offline
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 02-02-2021 , 11:46   Re: [CS:GO] Give zeus to a certain flag
Reply With Quote #2

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

#pragma semicolon 1
#pragma newdecls required

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

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

__________________
FAQU is offline
lemmon_cs
Member
Join Date: Jan 2019
Location: Romania
Old 02-03-2021 , 00:36   Re: [CS:GO] Give zeus to a certain flag
Reply With Quote #3

Not working.
lemmon_cs is offline
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 02-03-2021 , 03:49   Re: [CS:GO] Give zeus to a certain flag
Reply With Quote #4

Quote:
Originally Posted by lemmon_cs View Post
Not working.
Working fine on my end. Just make sure the player has the flag.
__________________
FAQU is offline
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
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 19:53.


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