AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Solved [REQ][CS:GO] give weapon on start (https://forums.alliedmods.net/showthread.php?t=313201)

Jezis 12-31-2018 10:37

[REQ][CS:GO] give weapon on start
 
I have small issue on my server, that should be easily fixed by plugin that i request.

This plugin should give players knife/glock 1 second, after the round starts.

Thanks in advance.

iskenderkebab33 12-31-2018 11:46

Re: [REQ][CS:GO] give weapon on start
 
did you already try:

mp_ct_default_melee "weapon_knife"
mp_t_default_melee "weapon_knife"

mp_ct_default_secondary "weapon_hkp2000"
mp_t_default_secondary "weapon_glock"

Di3Z1E 12-31-2018 18:12

Re: [REQ][CS:GO] give weapon on start
 
Try this

PHP Code:

#include <sourcemod>
#include <sdktools>
#include <smlib>

#define PLUGIN_AUTHOR "Di3Z1E"
#define PLUGIN_VERSION "0.00"

public Plugin myinfo 
{
    
name ""
    
author PLUGIN_AUTHOR
    
description ""
    
version PLUGIN_VERSION
    
url ""
};

public 
OnPluginStart()
{
    
HookEvent("player_spawn"OnPlayerSpawn);
}

public 
Action OnPlayerSpawn(Event e, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(e"userid"));
    
int team GetClientTeam(client);
    
    if (
team == 2
    {
        
GivePlayerItem(client"weapon_glock");
        
GivePlayerItem(client"weapon_knife");
    }
    



Jezis 01-01-2019 12:15

Re: [REQ][CS:GO] give weapon on start
 
Quote:

Originally Posted by iskenderkebab33 (Post 2632036)
did you already try:

mp_ct_default_melee "weapon_knife"
mp_t_default_melee "weapon_knife"

mp_ct_default_secondary "weapon_hkp2000"
mp_t_default_secondary "weapon_glock"

Yes, I did, but other plugins block this.

Quote:

Originally Posted by Di3Z1E (Post 2632095)
Try this

PHP Code:

#include <sourcemod>
#include <sdktools>
#include <smlib>

#define PLUGIN_AUTHOR "Di3Z1E"
#define PLUGIN_VERSION "0.00"

public Plugin myinfo 
{
    
name ""
    
author PLUGIN_AUTHOR
    
description ""
    
version PLUGIN_VERSION
    
url ""
};

public 
OnPluginStart()
{
    
HookEvent("player_spawn"OnPlayerSpawn);
}

public 
Action OnPlayerSpawn(Event e, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(e"userid"));
    
int team GetClientTeam(client);
    
    if (
team == 2
    {
        
GivePlayerItem(client"weapon_glock");
        
GivePlayerItem(client"weapon_knife");
    }
    



Thank you, I will give it a try.


All times are GMT -4. The time now is 03:08.

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