Raised This Month: $305 Target: $400
 76%   Almost there!

[REQ] freequips with freeguns too


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tuga
New Member
Join Date: Dec 2015
Old 04-13-2016 , 11:17   [REQ] freequips with freeguns too
Reply With Quote #1

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 );
            }
        }
    }


Last edited by Tuga; 04-13-2016 at 11:22.
Tuga is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-13-2016 , 19:21   Re: [REQ] freequips with freeguns too
Reply With Quote #2

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)

__________________

Last edited by EFFx; 04-13-2016 at 19:23.
EFFx is offline
Send a message via Skype™ to EFFx
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-14-2016 , 12:30   Re: [REQ] freequips with freeguns too
Reply With Quote #3

Quote:
Originally Posted by EFFx View Post
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.
EpicMonkey is offline
Tuga
New Member
Join Date: Dec 2015
Old 04-16-2016 , 01:56   Re: [REQ] freequips with freeguns too
Reply With Quote #4

Thank you very much guys! for the help
Tuga 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 20:06.


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