Raised This Month: $ Target: $400
 0% 

Dgl & Shotguns only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-14-2009 , 11:37   Dgl & Shotguns only
Reply With Quote #1

Hey,

There was a plugin that alow users just to have Shutguns & dgl. but i dont finde this. know anyone where can i find this?

the users should have just shutgund with dgl on a map. :-(
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-14-2009 , 11:57   Re: Dgl & Shotguns only
Reply With Quote #2

There is so much plugins like this, not know exactly, but it's stupid to do it for you, if there already exists same plugin for ak and usp. Anyway you can do it with any combination, like restrict other weapons and get unlimited money plugin or something.
SnoW is offline
Send a message via MSN to SnoW
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-14-2009 , 12:03   Re: Dgl & Shotguns only
Reply With Quote #3

Hey,

i wannt it just on a map & the players can just buy shotgun & DGL. i saw it on a server too but dont know which. & dont know the plugin name, the plugin was here in forum :-( im 99% sure :-(
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
X0Left4dead0X
BANNED
Join Date: Jan 2009
Old 01-14-2009 , 13:35   Re: Dgl & Shotguns only
Reply With Quote #4

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta_util> // Gives the constant macro crap =p when compiling
#include <fun>

#define PLUGIN "Annomity"
#define VERSION "1.3.3.7"
#define AUTHOR "Left 4 Dead"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("RawrStart"2"0=World triggered""1=Round_Start");
    
register_logevent("RawrEnd"2"0=World triggered""1=Round_End");
}

public 
RawrStart(id)
{
    if(
is_user_alive(id))
    {
        
fm_give_item(id"weapon_xm1014")
        
fm_give_item(id"weapon_deagle")
        
        
cs_set_user_bpammo(id,CSW_XM1014cs_get_user_bpammo(id,CSW_XM1014) + 30)
        
cs_set_user_bpammo(id,CSW_DEAGLEcs_get_user_bpammo(id,CSW_DEAGLE) + 30)
    }
}

public 
RawrEnd(id)
{
    
cs_set_user_bpammo(id,CSW_XM1014cs_get_user_bpammo(id,CSW_XM1014) + 0)
    
cs_set_user_bpammo(id,CSW_DEAGLEcs_get_user_bpammo(id,CSW_DEAGLE) + 0)



You will need to type in the console amxmodmenu press 9 then weapon Restrict and Restrict everything but the constant shotgun and the deagle
Attached Files
File Type: sma Get Plugin or Get Source (give_shotgundgl.sma - 723 views - 1.1 KB)
X0Left4dead0X is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 01-14-2009 , 14:20   Re: Dgl & Shotguns only
Reply With Quote #5

My way ^_^
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn"1)
}
public 
fw_PlayerSpawn(id)
{   
    if (
is_user_alive(id))
    {
        if(!
user_has_weapon(id,CSW_M3))
        {
        
fm_give_item(id"weapon_m3");
        
cs_set_user_bpammo(id,CSW_M3,32);
    }
        if(!
user_has_weapon(id,CSW_DEAGLE))
        {
        
fm_give_item(id"weapon_deagle");
        
cs_set_user_bpammo(id,CSW_DEAGLE,35);
    }
    if(
user_has_weapon(id,CSW_USP))
        {
        
ham_strip_weapon(id,"weapon_usp")
        }
    if(
user_has_weapon(id,CSW_GLOCK18))
        {
        
ham_strip_weapon(id,"weapon_glock18")
        }
    }
}

// Stocks //
stock fm_give_item(index, const item[])
{
    if (!
equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
        return 
0

    
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem))
    if (!
pev_valid(ent))
        return 
0

    
new Float:origin[3]
    
pev(indexpev_originorigin)
    
set_pev(entpev_originorigin)
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN)
    
dllfunc(DLLFunc_Spawnent)

    new 
save pev(entpev_solid)
    
dllfunc(DLLFunc_Touchentindex)
    if (
pev(entpev_solid) != save)
        return 
ent

    engfunc
(EngFunc_RemoveEntityent)

    return -
1
}
stock ham_strip_weapon(id,weapon[])
{
    if(!
equal(weapon,"weapon_",7)) return 0;

    new 
wId get_weaponid(weapon);
    if(!
wId) return 0;

    new 
wEnt;
    while((
wEnt engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {}
    if(!
wEnt) return 0;

    if(
get_user_weapon(id) == wIdExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);

    if(!
ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0;
    
ExecuteHamB(Ham_Item_Kill,wEnt);

    
set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId));

    
// this block should be used for Counter-Strike:
    /*if(wId == CSW_C4)
    {
        cs_set_user_plant(id,0,0);
        cs_set_user_bpammo(id,CSW_C4,0);
    }
    else if(wId == CSW_SMOKEGRENADE || wId == CSW_FLASHBANG || wId == CSW_HEGRENADE)
        cs_set_user_bpammo(id,wId,0);*/

    
return 1;

Attached Files
File Type: sma Get Plugin or Get Source (give_weapon.sma - 666 views - 2.2 KB)

Last edited by xbatista; 01-14-2009 at 14:31.
xbatista is offline
Send a message via Skype™ to xbatista
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-14-2009 , 14:46   Re: Dgl & Shotguns only
Reply With Quote #6

Hey,

Ty guys, but when i restrict all weapons, i cant have it on 1 map. i have all weapons restricted on all maps. this is the problem
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Old 01-14-2009, 14:55
SnoW
This message has been deleted by SnoW. Reason: Anyway...
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-14-2009 , 12:45   Re: Dgl & Shotguns only
Reply With Quote #8

Quote:
Originally Posted by SnoW View Post
like restrict other weapons
If you want that they should buy them, wouldn't that fit your needs?
SnoW is offline
Send a message via MSN to SnoW
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-15-2009 , 22:28   Re: Dgl & Shotguns only
Reply With Quote #9

PHP Code:
public removec4(id)
{
  new 
wpnid read_data(3)
          if(
wpnid == CSW_C4)
          {
  return 
PLUGIN_HANDLED
          }
 return 
1;

Just make sure at every { you indent with tab

Last edited by Doc-Holiday; 01-16-2009 at 01:53.
Doc-Holiday is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-16-2009 , 06:49   Re: Dgl & Shotguns only
Reply With Quote #10

Quote:
Originally Posted by NcB_Sav View Post
PHP Code:
public removec4(id)
{
  new 
wpnid read_data(3)
          if(
wpnid == CSW_C4)
          {
  return 
PLUGIN_HANDLED
          }
 return 
1;

Just make sure at every { you indent with tab
Hey,

Ty. i dont know maybe im doing anything there wrong :-(

PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Loose indentation on line 67
Warning
Loose indentation on line 71
Header size
:            632 bytes
Code size
:             2908 bytes
Data size
:             2624 bytes
Stack
/heap size:      16384 bytesestimated maxusage=42 cells (168 bytes)
Total requirements:   22548 bytes

2 Warnings
.
Done
PHP Code:
65.{
66. new wpnid read_data(3)
67.          if(wpnid == CSW_C4)
68.          {
69.  return PLUGIN_HANDLED
70.          }
71. return 1;
72.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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 14:11.


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