AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block weapon switch.. (https://forums.alliedmods.net/showthread.php?t=90050)

Empowers 04-13-2009 11:56

Block weapon switch..
 
How to block weapon switch.. Like when new round starts or player pickups item.



don't even advice me this =) :
PHP Code:

engclient_cmd(id"_cl_autowepswitch 0"


So..

Any suggestions?

ConnorMcLeod 04-13-2009 12:01

Re: Block weapon switch..
 
Try this :

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "test"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define bAutoWepSwitch 509

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Spawn"player""Player_Spawn")
}

public 
Player_Spawn(id)
{
    if( 
is_user_aliveid ) )
    {
        
set_pdata_int(idbAutoWepSwitchfalse)
    }


Quote:

510 - setinfo _vgui_menus (1<<0), _ah (1<<8 ), uses_shield (1<<16), has_shield (1<<24)

Empowers 04-13-2009 12:09

Re: Block weapon switch..
 
U A are turning off vgui_menus O_o. In code above..

ConnorMcLeod 04-13-2009 12:14

Re: Block weapon switch..
 
LoL
Will be soon updated :D

Empowers 04-13-2009 12:26

Re: Block weapon switch..
 
It doesn't work :)..

Maybe there is some Ham hook or somethink like that to supercede weapon switch?

Empowers 04-13-2009 12:33

Re: Block weapon switch..
 
And even if I will set _cl_autowepswitch to 0 that won't cover all stuff.. In round start weapon is stripped for a mili second a then gived again.
So on screen your will see your weapon re-switched..

Any Suggestions? :}

ConnorMcLeod 04-13-2009 13:25

Re: Block weapon switch..
 
Quote:

Originally Posted by Empowers (Post 804590)
And even if I will set _cl_autowepswitch to 0 that won't cover all stuff.. In round start weapon is stripped for a gived again.
So on screen your will see your weapon re-switched..

Any Suggestions? :}

That happens only when you are the bomb carrier i guess ?
That bug that stops your weapon from reloading ;)

Empowers 04-13-2009 13:37

Re: Block weapon switch..
 
Quote:

Originally Posted by ConnorMcLeod (Post 804611)
That happens only when you are the bomb carrier i guess ?
That bug that stops your weapon from reloading ;)

Yes

Hunter-Digital 04-13-2009 13:53

Re: Block weapon switch..
 
There's a plugin that stops that bug... might be usefull http://forums.alliedmods.net/showthread.php?p=698940

Empowers 04-13-2009 16:01

Re: Block weapon switch..
 
Quote:

Originally Posted by Hunter-Digital (Post 804638)
There's a plugin that stops that bug... might be usefull http://forums.alliedmods.net/showthread.php?p=698940

No that won't work in my case..

Really strange is there no way to supercede weapon switch... O_o


All times are GMT -4. The time now is 02:17.

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