Raised This Month: $ Target: $400
 0% 

Multiple Guns


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
THC
Member
Join Date: May 2009
Old 10-31-2010 , 06:01   Multiple Guns
Reply With Quote #1

hi
I need a plugin for a headshot server to give everyone 2 guns (ak47+m4a1) + deagle and usp at beginning of round
Thanks all
__________________
THC is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-31-2010 , 06:06   Re: Multiple Guns
Reply With Quote #2

Code:
#include <amxmodx> #include <fun>   public plugin_init()         register_event("HLTV", "eventHLTV", "a", "1=0", "2=0");   public eventHLTV()         set_task(0.1, "taskGiveWeapons");   public taskGiveWeapons() {         new iPlayers[32], iCount;         get_players(iPlayers, iCount, "a");           if (!iCount)                 return;           for (new iPos, iClient; iPos < iCount; iPos++)         {                 iClient = iPlayers[iPos];                   give_item(iClient, "weapon_m4a1");                 give_item(iClient, "weapon_ak47");                 give_item(iClient, "weapon_deagle");                 give_item(iClient, "weapon_usp");         } }
__________________
hleV is offline
THC
Member
Join Date: May 2009
Old 10-31-2010 , 08:53   Re: Multiple Guns
Reply With Quote #3

thanks for help the plugin work nice can you add to give amo for weapons ...
__________________
THC is offline
Old 11-06-2010, 06:39
THC
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 11-06-2010 , 13:48   Re: Multiple Guns
Reply With Quote #4

Quote:
Originally Posted by THC View Post
samone pls can add amo to weapons ??
Attached Files
File Type: sma Get Plugin or Get Source (wpn.sma - 415 views - 941 Bytes)
nnajko is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-06-2010 , 18:12   Re: Multiple Guns
Reply With Quote #5

Quote:
Originally Posted by THC View Post
samone pls can add amo to weapons ??
Don't bump until 2 weeks have passed since last post.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
THC
Member
Join Date: May 2009
Old 11-07-2010 , 13:29   Re: Multiple Guns
Reply With Quote #6

and other small problem if i play ts and have m4a1 and i tru a nade is change the gun with ak47 i dont know why dont came back with m4a1

thanks all for help and soory Exolent for bump this topic
__________________
THC is offline
THC
Member
Join Date: May 2009
Old 12-31-2011 , 08:28   Re: Multiple Guns
Reply With Quote #7

Hello
when this plugin is on i have server console full with overflow message
and same time crash the server 2 or 3 times per day what its not nice but i need this plugin if someone can help me ..
and yes Happy new year

Quote:
SZ_GetSpace: overflow on netchan->message

WARNING: reliable overflow for Hizballah

Dropped Hizballah from server

Reason: Reliable channel overflowed
someone can fix this code please ?

Code:
#include <amxmodx>
#include <fun>
#include <cstrike> 
 
public plugin_init()
	register_event("HLTV", "eventHLTV", "a", "1=0", "2=0");
 
public eventHLTV()
	set_task(0.1, "taskGiveWeapons");
 
public taskGiveWeapons()
{
	new iPlayers[32], iCount;
	get_players(iPlayers, iCount, "a");
 
	if (!iCount)
		return;
 
	for (new iPos, iClient; iPos < iCount; iPos++)
	{
		iClient = iPlayers[iPos];
 
		give_item(iClient, "weapon_m4a1");
		give_item(iClient, "weapon_ak47");
		give_item(iClient, "weapon_deagle");
		give_item(iClient, "weapon_usp");
		cs_set_user_bpammo(iClient, CSW_M4A1, 90);
		cs_set_user_bpammo(iClient, CSW_AK47, 90);
		cs_set_user_bpammo(iClient, CSW_DEAGLE, 35);
		cs_set_user_bpammo(iClient, CSW_USP, 100);
        }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1053\\ f0\\ fs16 \n\\ par }
*/
__________________

Last edited by THC; 12-31-2011 at 08:39.
THC is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 12-31-2011 , 08:41   Re: Multiple Guns
Reply With Quote #8

PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich> 
 
public plugin_init( )
{
    
RegisterHamHam_Spawn"player""PlayerSpawn_Post");
}

public 
PlayerSpawn_Postid )
{
    if( 
is_user_aliveid ) )
    {
        
give_itemid"weapon_m4a1" );
        
cs_set_user_bpammoidCSW_M4A190 );
        
give_itemid"weapon_ak47" );
        
cs_set_user_bpammoidCSW_AK4790 );
        
give_itemid"weapon_deagle" );
        
cs_set_user_bpammoidCSW_DEAGLE35 );
        
give_itemid"weapon_usp" );
        
cs_set_user_bpammoidCSW_USP100 );
    }

Attached Files
File Type: sma Get Plugin or Get Source (weapons.sma - 517 views - 562 Bytes)
__________________
micapat is offline
THC
Member
Join Date: May 2009
Old 01-01-2012 , 06:43   Re: Multiple Guns
Reply With Quote #9

Thanks and to have unlimited amo i will add other plugin or you can add to this scrip ?
Happy New Year All
__________________

Last edited by THC; 01-01-2012 at 06:44.
THC is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-01-2012 , 08:09   Re: Multiple Guns
Reply With Quote #10

Other is better.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "0.0.1"

enum
{
    
CurWeapon_IsActive 1// byte
    
CurWeapon_WeaponID// byte
    
CurWeapon_ClipAmmo // byte
}

const 
XO_WEAPON    =    4
const m_iClip        =    51
const m_iClientClip =    52

const XO_PLAYER    =    5
const m_pActiveItem    373

public plugin_init()
{
    
register_plugin("Infinite Ammo"VERSION"ConnorMcLeod")

    
register_message(get_user_msgid("CurWeapon"), "Message_CurWeapon")
}

public 
Message_CurWeapon(iMsgIdiMsgDestid)
{
    if( 
get_msg_arg_int(CurWeapon_IsActive) )
    {
        if( 
get_msg_arg_int(CurWeapon_ClipAmmo) < 255 )
        {
            new 
iWeapon get_pdata_cbase(idm_pActiveItemXO_PLAYER)
            if( 
iWeapon )
            {
                
set_pdata_int(iWeaponm_iClip255XO_WEAPON)
                
set_pdata_int(iWeaponm_iClientClip255XO_WEAPON)

                
set_msg_arg_int(CurWeapon_ClipAmmoARG_BYTE255)
            }
        }
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-01-2012 at 08:12.
ConnorMcLeod 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 19:59.


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