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

[REQUEST] Free grenades on spawn for custom flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lemmon_cs
Member
Join Date: Jan 2019
Location: Romania
Old 12-04-2019 , 11:19   [REQUEST] Free grenades on spawn for custom flag
Reply With Quote #1

I need a plugin that gives full nades to a custom flag (AMDFLAG_CUSTOM1). Game : CSGO.
lemmon_cs is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 12-04-2019 , 13:58   Re: [REQUEST] Free grenades on spawn for custom flag
Reply With Quote #2

not tested, but should work

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

#pragma semicolon 1
#pragma newdecls required

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

public 
void Event_PlayerSpawn(Event hEvent, const char[] sEventNamebool bDontBroadcast)
{
    
int userid hEvent.GetInt("userid");
    
    if (
IsClientInGame(GetClientOfUserId(userid)))
    {
        
CreateTimer(0.3Timer_Delayuserid);
    }
}

public 
Action Timer_Delay(Handle hTimerint userid)
{
    
int client GetClientOfUserId(userid);
    
    if(
IsClientInGame(client) && GetUserFlagBits(client) && ADMFLAG_CUSTOM1)
    {
        switch (
GetClientTeam(client))
        {
            case 
2:
            {
                
GivePlayerItem(client"weapon_hegrenade");
                
GivePlayerItem(client"weapon_flashbang");
                
GivePlayerItem(client"weapon_smokegrenade");
                
GivePlayerItem(client"weapon_molotov");
            }
            case 
3:
            {
                
GivePlayerItem(client"weapon_hegrenade");
                
GivePlayerItem(client"weapon_flashbang");
                
GivePlayerItem(client"weapon_smokegrenade");
                
GivePlayerItem(client"weapon_incgrenade");
            }
        }
    }

iskenderkebab33 is offline
lemmon_cs
Member
Join Date: Jan 2019
Location: Romania
Old 12-04-2019 , 15:34   Re: [REQUEST] Free grenades on spawn for custom flag
Reply With Quote #3

It works , thanks.
lemmon_cs 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 18:44.


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