Raised This Month: $ Target: $400
 0% 

Dgl & Shotguns only


Post New Thread Reply   
 
Thread Tools Display Modes
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-15-2009 , 11:49   Re: Dgl & Shotguns only
Reply With Quote #21

Hey,

Yea i did, its compile but if(wpnid == CSW_C4) lose function :-(

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Warning: Loose indentation on line 68
Warning: Function "removec4" should return a value on line 72
Header size:            632 bytes
Code size:             2900 bytes
Data size:             2624 bytes
Stack/heap size:      16384 bytes; estimated max. usage=42 cells (168 bytes)
Total requirements:   22540 bytes

2 Warnings.
Done.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new g_iFhKeyValue

public plugin_precache()
{
    new 
iEnt

    iEnt 
engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "player_weaponstrip" ) )
    
SetKeyValue(iEnt"origin""9999 9999 9999""player_weaponstrip")
    
SetKeyValue(iEnt"targetname""stripper""player_weaponstrip")
    
dllfunc(DLLFunc_SpawniEnt)

    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "game_player_equip" ) )
    
SetKeyValue(iEnt"weapon_knife""1""game_player_equip")
    
SetKeyValue(iEnt"weapon_deagle""1""game_player_equip")
    
SetKeyValue(iEnt"ammo_50ae""5""game_player_equip")
    
SetKeyValue(iEnt"weapon_m3""1""game_player_equip")
    
SetKeyValue(iEnt"ammo_buckshot""4""game_player_equip")
    
SetKeyValue(iEnt"targetname""equipment""game_player_equip")
    
dllfunc(DLLFunc_SpawniEnt)

    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "multi_manager" ) )
    
SetKeyValue(iEnt"stripper""0""multi_manager")
    
SetKeyValue(iEnt"equipment""1""multi_manager")
    
SetKeyValue(iEnt"targetname""game_playerspawn""multi_manager")
    
SetKeyValue(iEnt"spawnflags""1""multi_manager")
    
dllfunc(DLLFunc_SpawniEnt)

    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "info_map_parameters" ) )
    
SetKeyValue(iEnt"buying""3""info_map_parameters")
    
dllfunc(DLLFunc_SpawniEnt)

    
g_iFhKeyValue register_forward(FM_KeyValue"KeyValue")
}

SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[])
{
    
set_kvd(0KV_ClassNameszClassName)
    
set_kvd(0KV_KeyNameszKey)
    
set_kvd(0KV_ValueszValue)
    
set_kvd(0KV_fHandled0)
    
dllfunc(DLLFunc_KeyValueiEnt0)
}

public 
KeyValue(iEntkvd_handle)
{
    if( 
pev_valid(iEnt) )
    {
        static 
szClassName[20]
        
get_kvd(kvd_handleKV_ClassNameszClassNamecharsmax(szClassName))
        if(    
equal(szClassName"game_player_equip")
        ||    
equal(szClassName"info_map_parameters")
        ||    
equal(szClassName"player_weaponstrip")    )
        {
            
engfuncEngFunc_RemoveEntityiEnt )
            return 
FMRES_SUPERCEDE
        
}
    }
    return 
FMRES_IGNORED
}
public 
removec4(id)
{
  new 
wpnid read_data(3)

          if(
wpnid == CSW_C4)
          {
          return 
PLUGIN_HANDLED
          }
}  
public 
plugin_init()
{
    
unregister_forward(FM_KeyValueg_iFhKeyValue)
    
set_cvar_float("sv_restart"1.0)

    
register_plugin("Only Deagle and ShotGun""0.0.1""ConnorMcLeod")

    
pause("ad")

__________________
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
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-15-2009 , 22:28   Re: Dgl & Shotguns only
Reply With Quote #22

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 #23

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
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-16-2009 , 06:53   Re: Dgl & Shotguns only
Reply With Quote #24

This portion of code can't have any effect in my plugin.
I haven't found a good way with this method so i may have to rewrite the whole plugin another way, or you may have to use another plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-16-2009 , 07:06   Re: Dgl & Shotguns only
Reply With Quote #25

Hey,

i dont know anther way/plugins 4 this :-(. i tried all what i knowd but .. :-( u know this is very funny & its realy good for the maps like de_westwood. have a see on my public server in my signator & join please when there is the westwood running. maybe u get better ideas. :-(or maybe this willbe a westwood plugin & u can release this :-(
__________________
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
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-17-2009 , 08:05   Re: Dgl & Shotguns only
Reply With Quote #26

Seems to work
Attached Files
File Type: sma Get Plugin or Get Source (deagle_and_shotgun.sma - 518 views - 1.6 KB)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-17-2009 , 09:00   Re: Dgl & Shotguns only
Reply With Quote #27

Quote:
Originally Posted by ConnorMcLeod View Post
Seems to work
Hey,

Thank you very very much.

another question :

PHP Code:
    SetKeyValue(iEnt"weapon_defuse_kit""1""game_player_equip"
its right to give a defkit to all CTs?
__________________
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
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-17-2009 , 10:06   Re: Dgl & Shotguns only
Reply With Quote #28

Quote:
Originally Posted by One View Post
Hey,its right to give a defkit to all CTs?
No.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-17-2009 , 11:36   Re: Dgl & Shotguns only
Reply With Quote #29

Quote:
Originally Posted by ConnorMcLeod View Post
No.
Hey,

PHP Code:
    SetKeyValue(iEnt"defuser""1""game_player_equip"
?

EDIT : I tried this all but not function :-( how to give defuser? this will be realy nice when u could say how. ty
__________________

Last edited by One; 01-17-2009 at 11:42.
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
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-17-2009 , 12:13   Re: Dgl & Shotguns only
Reply With Quote #30

item_thighpack ;)
__________________
- tired and retired -

- my plugins -
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 22:25.


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