AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] freequips with freeguns too (https://forums.alliedmods.net/showthread.php?t=281515)

Tuga 04-13-2016 11:17

[REQ] freequips with freeguns too
 
Hello everyone, well I have this plugin, but it only me of grenades, I wanted him to give me a AK47 for terrorists, and m4 to the CTS, can someone help me? receive in the second round
Thank you very much..

Best regards.

PHP Code:

Thank fysiks

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define PLUGIN_NAME "Free Equips"
#define PLUGIN_VERSION "1.1"
#define PLUGIN_AUTHOR "BBQ"

#pragma semicolon 1

new gEnableEquips;

public 
plugin_init()
{
    
register_pluginPLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR );
    
RegisterHamHam_Spawn"player""free_equips");
    
gEnableEquips register_cvar"free_equips""1" );
}

public 
free_equips(id)
{
    if( 
is_user_aliveid ) && get_pcvar_numgEnableEquips ) )
    {
        
// Both Teams
        
give_item id,"weapon_hegrenade");
        
give_item id,"weapon_smokegrenade");
        
give_item id,"weapon_flashbang");
        
give_item id,"weapon_flashbang");
        
cs_set_user_nvgid1);
        
cs_set_user_armor id100CsArmorType:);
        
        switch( 
get_user_team(id) )
        {
            case 
1:
            {
                
// Team 1
            
}
            case 
2:
            {
                
// Team 2
                
cs_set_user_defuseid100205 );
            }
        }
    }



EFFx 04-13-2016 19:21

Re: [REQ] freequips with freeguns too
 
Add
PHP Code:

if(get_user_team(id) == 1)
{
give_item(id,"weapon_ak47")
cs_set_user_bpammo(idCSW_AK47,90)
}
else if(
get_user_team(id) == 2)
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(idCSW_M4A1,90)
cs_set_user_defuse(id,1)



EpicMonkey 04-14-2016 12:30

Re: [REQ] freequips with freeguns too
 
Quote:

Originally Posted by EFFx (Post 2410849)
Add
PHP Code:

if(get_user_team(id) == 1)
{
give_item(id,"weapon_ak47")
cs_set_user_bpammo(idCSW_AK47,90)
}
else if(
get_user_team(id) == 2)
{
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(idCSW_M4A1,90)
cs_set_user_defuse(id,1)



Read through this: https://forums.alliedmods.net/showthread.php?t=42159, find round start there. You've missed it in another thread as well.

Tuga 04-16-2016 01:56

Re: [REQ] freequips with freeguns too
 
Thank you very much guys! for the help :D


All times are GMT -4. The time now is 12:01.

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