Raised This Month: $ Target: $400
 0% 

Solved [CSGO] Get Random Weapon On Warmup


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 12-27-2018 , 15:10   [CSGO] Get Random Weapon On Warmup
Reply With Quote #1

hi guys!
i need to a plugin, script or cvar for get random weapon on warmup.

please help me.

Last edited by Dr.Mohammad; 12-28-2018 at 05:55.
Dr.Mohammad is offline
Brum Brum
Junior Member
Join Date: Mar 2017
Old 12-27-2018 , 15:56   Re: [CSGO] Get Random Weapon On Warmup
Reply With Quote #2

PHP Code:
#include <sdktools>

char WeaponList[][] = 
{
    
"weapon_glock""weapon_usp_silencer""weapon_deagle""weapon_tec9""weapon_hkp2000""weapon_p250""weapon_fiveseven""weapon_elite""weapon_cz75a""weapon_galilar""weapon_famas""weapon_ak47""weapon_m4a1""weapon_m4a1_silencer""weapon_ssg08""weapon_aug""weapon_sg556""weapon_awp""weapon_scar20""weapon_g3sg1""weapon_nova""weapon_xm1014""weapon_mag7""weapon_m249""weapon_negev""weapon_mac10""weapon_mp9""weapon_mp7""weapon_ump45""weapon_p90""weapon_bizon""weapon_mp5sd""weapon_sawedoff""weapon_knife""weapon_flashbang""weapon_hegrenade""weapon_smokegrenade""weapon_healthshot""weapon_decoy""weapon_molotov""weapon_incgrenade""weapon_tagrenade""weapon_taser"
};

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

public 
Action Event_PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    if (
IsWarmup())
    {
        
int client GetClientOfUserId(event.GetInt("userid"));
        
int rw GetRandomInt(0sizeof(WeaponList));
        
GivePlayerItem(clientWeaponList[rw]);
    }
}

stock bool IsWarmup()
{
    
int warmup GameRules_GetProp("m_bWarmupPeriod"40);
    if (
warmup == 1)return true;
    else return 
false;

Brum Brum is offline
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 12-28-2018 , 05:54   Re: [CSGO] Get Random Weapon On Warmup
Reply With Quote #3

Quote:
Originally Posted by Brum Brum View Post
PHP Code:
#include <sdktools>

char WeaponList[][] = 
{
    
"weapon_glock""weapon_usp_silencer""weapon_deagle""weapon_tec9""weapon_hkp2000""weapon_p250""weapon_fiveseven""weapon_elite""weapon_cz75a""weapon_galilar""weapon_famas""weapon_ak47""weapon_m4a1""weapon_m4a1_silencer""weapon_ssg08""weapon_aug""weapon_sg556""weapon_awp""weapon_scar20""weapon_g3sg1""weapon_nova""weapon_xm1014""weapon_mag7""weapon_m249""weapon_negev""weapon_mac10""weapon_mp9""weapon_mp7""weapon_ump45""weapon_p90""weapon_bizon""weapon_mp5sd""weapon_sawedoff""weapon_knife""weapon_flashbang""weapon_hegrenade""weapon_smokegrenade""weapon_healthshot""weapon_decoy""weapon_molotov""weapon_incgrenade""weapon_tagrenade""weapon_taser"
};

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

public 
Action Event_PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    if (
IsWarmup())
    {
        
int client GetClientOfUserId(event.GetInt("userid"));
        
int rw GetRandomInt(0sizeof(WeaponList));
        
GivePlayerItem(clientWeaponList[rw]);
    }
}

stock bool IsWarmup()
{
    
int warmup GameRules_GetProp("m_bWarmupPeriod"40);
    if (
warmup == 1)return true;
    else return 
false;

worked. thank you
Dr.Mohammad 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 11:31.


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