AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Smokegrenade + Flashbang in One [new smokegren] (https://forums.alliedmods.net/showthread.php?t=225398)

nikolov 09-04-2013 08:05

Smokegrenade + Flashbang in One [new smokegren]
 
Hi guys :)
Sorry about stupid title :(
I'm searching one plugin.

Description:
When you throw smokegrenade you will be flashed after exploding the smoke. Smoke + Flash in One.


Thanks Advance :)

tonykaram1993 09-18-2013 08:02

Re: Smokegrenade + Flashbang in One [new smokegren]
 
I think I have an idea of how to accomplish this, however right now I am busy with another plugin. Let's hope, when I finish my current project, I will remember to do this unless this has already been made.

hornet 09-18-2013 08:23

Re: Smokegrenade + Flashbang in One [new smokegren]
 
1 Attachment(s)
Have a blast ;)
Code:
#include <amxmodx> #include <orpheu> #define VERSION     "0.0.1" new OrpheuFunction:CGrenade_Detonate; public plugin_init() {     register_plugin( "Smoke / Flash IO", VERSION, "hornet" );         CGrenade_Detonate = OrpheuGetFunction( "Detonate", "CGrenade" );     OrpheuRegisterHook( OrpheuGetFunction( "SG_Detonate", "CGrenade" ), "OnCGrenade_SG_Detonate" ); } public OrpheuHookReturn:OnCGrenade_SG_Detonate( iEnt ) {     OrpheuCall( CGrenade_Detonate, iEnt ); }

yokomo 09-18-2013 08:40

Re: Smokegrenade + Flashbang in One [new smokegren]
 
Quote:

Originally Posted by hornet (Post 2036828)
Have a blast ;)
Code:
#include <amxmodx> #include <orpheu> #define VERSION &nbsp;&nbsp;&nbsp;&nbsp;"0.0.1" new OrpheuFunction:CGrenade_Detonate; public plugin_init() { &nbsp;&nbsp;&nbsp;&nbsp;register_plugin( "Smoke / Flash IO", VERSION, "hornet" ); &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;CGrenade_Detonate = OrpheuGetFunction( "Detonate", "CGrenade" ); &nbsp;&nbsp;&nbsp;&nbsp;OrpheuRegisterHook( OrpheuGetFunction( "SG_Detonate", "CGrenade" ), "OnCGrenade_SG_Detonate" ); } public OrpheuHookReturn:OnCGrenade_SG_Detonate( iEnt ) { &nbsp;&nbsp;&nbsp;&nbsp;OrpheuCall( CGrenade_Detonate, iEnt ); }

Haha just like what i'm thinking, Orpheu is the way. Good job.

tonykaram1993 09-18-2013 11:24

Re: Smokegrenade + Flashbang in One [new smokegren]
 
I just wish I had my way with Orpheu. Orpheu and I are not compatible friends yet :S

nikolov 09-19-2013 06:27

Re: Smokegrenade + Flashbang in One [new smokegren]
 
Quote:

Originally Posted by hornet (Post 2036828)
Have a blast ;)
Code:
#include <amxmodx> #include <orpheu> #define VERSION &nbsp;&nbsp;&nbsp;&nbsp;"0.0.1" new OrpheuFunction:CGrenade_Detonate; public plugin_init() { &nbsp;&nbsp;&nbsp;&nbsp;register_plugin( "Smoke / Flash IO", VERSION, "hornet" ); &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;CGrenade_Detonate = OrpheuGetFunction( "Detonate", "CGrenade" ); &nbsp;&nbsp;&nbsp;&nbsp;OrpheuRegisterHook( OrpheuGetFunction( "SG_Detonate", "CGrenade" ), "OnCGrenade_SG_Detonate" ); } public OrpheuHookReturn:OnCGrenade_SG_Detonate( iEnt ) { &nbsp;&nbsp;&nbsp;&nbsp;OrpheuCall( CGrenade_Detonate, iEnt ); }

Can u make cvar (on/off) ?

tonykaram1993 09-19-2013 18:06

Re: Smokegrenade + Flashbang in One [new smokegren]
 
You either want this or you don't. Why do you need a cvar?

Kia 09-20-2013 00:35

AW: Re: Smokegrenade + Flashbang in One [new smokegren]
 
Quote:

Originally Posted by tonykaram1993 (Post 2037646)
You either want this or you don't. Why do you need a cvar?

It's too hard to go through the amxmodmenu to disable a plugin. ;)

tonykaram1993 09-20-2013 09:32

Re: AW: Re: Smokegrenade + Flashbang in One [new smokegren]
 
Quote:

Originally Posted by Kia (Post 2037712)
It's too hard to go through the amxmodmenu to disable a plugin. ;)

You make plugins, and it's hard? :shock:
I am just joking, but here's a tip: "Something that takes a couple more seconds to accomplish is not harder!"

nikolov 09-20-2013 14:20

Re: Smokegrenade + Flashbang in One [new smokegren]
 
PHP Code:

#include <amxmodx>
#include <orpheu>

new OrpheuFunction:CGrenade_Detonate;
new 
g_pEnable;

public 
plugin_init()
{
    
register_plugin"Smoke / Flash IO""0.0.1""hornet" );
    
    
g_pEnable register_cvar"amx_sf""1" );
    
    
CGrenade_Detonate OrpheuGetFunction"Detonate""CGrenade" );
    
OrpheuRegisterHookOrpheuGetFunction"SG_Detonate""CGrenade" ), "OnCGrenade_SG_Detonate" );
}

public 
OrpheuHookReturn:OnCGrenade_SG_DetonateiEnt )
    if(
get_pcvar_num(g_pEnable))
        
OrpheuCallCGrenade_DetonateiEnt ); 

Thanks :)


All times are GMT -4. The time now is 06:57.

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