AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Drop all weapons on round end (https://forums.alliedmods.net/showthread.php?t=101853)

superang 08-27-2009 19:20

Drop all weapons on round end
 
Hey all, what i want is that when round is over , when cts team win or t team win, all players drop all weapons they have
I think its easy

minimiller 08-27-2009 20:35

Re: Drop all weapons on round end
 
PHP Code:

#include <amxmodx>
#include <fun>

public plugin_init()
{
    
register_plugin("Drop weapons""1.0""Stewie!");
    
    
register_logevent("round_end"2"1=Round_End");
}

public 
round_end()
{
    
strip_user_weapons(id);
    
give_item(id"weapon_knife");


I've given them a knife back because im nice

Alucard^ 08-27-2009 21:23

Re: Drop all weapons on round end
 
PHP Code:

#include <amxmodx>
#include <fun>
#include <fakemeta> 

#define OFFSET_PRIMARYWEAPON        116 

public plugin_init()
{
    
register_plugin("Drop weapons""1.0""Stewie!");
    
    
register_logevent("round_end"2"1=Round_End");
}

public 
round_end()
{
    
strip_user_weapons(id);
    
set_pdata_int(idOFFSET_PRIMARYWEAPON0);
    
give_item(id"weapon_knife");


Or in the new round the bug of the strip weapons is fixed?

mplayerexe 08-28-2009 02:46

Re: Drop all weapons on round end
 
Hy,
can someone make a plugin that strip all weapons at round start and give a usp and a knife for CT and a glock and a knife for T

superang 08-28-2009 08:02

Re: Drop all weapons on round end
 
Na dont work look
[IMG]http://img44.**************/img44/6136/aasdasdg.png[/IMG]

P.S Alucard are you DarkAlucard from TGF Servers?

Alka 08-28-2009 08:54

Re: Drop all weapons on round end
 
Here
PHP Code:

#include <amxmodx>
#include <fun>
#include <fakemeta> 

#define OFFSET_PRIMARYWEAPON 116

new g_iMaxPlayers;

public 
plugin_init()
{
    
register_plugin("Drop weapons""1.0""Stewie!");
    
    
register_logevent("round_end"2"1=Round_End");
    
    
g_iMaxPlayers get_maxplayers();
}

public 
round_end()
{
    static 
id;
    for(
id id <= g_iMaxPlayers id++)
    {
        if(!
is_user_alive(id))
            continue;
        
        
strip_user_weapons(id);
        
set_pdata_int(idOFFSET_PRIMARYWEAPON0);
        
give_item(id"weapon_knife");
    }



superang 08-28-2009 09:46

Re: Drop all weapons on round end
 
WORKS GREAT can you do another plugin is that you dont move when round end

Alucard^ 08-28-2009 09:54

Re: Drop all weapons on round end
 
@superang

No, i am not this Alucard.

@Alka

Ups, i forget the loop.. i didn't try to compile ><

xPaw 08-28-2009 10:02

Re: Drop all weapons on round end
 
PHP Code:

#include <amxmodx>
#include <fun>
#include <fakemeta> 

#define OFFSET_PRIMARYWEAPON 116

new g_iMaxPlayers;

public 
plugin_init()
{
    
register_plugin("Drop weapons""1.0""Stewie!");
    
    
register_logevent("round_end"2"1=Round_End");
    
    
g_iMaxPlayers get_maxplayers();
}

public 
round_end()
{
    static 
id;
    for(
id id <= g_iMaxPlayers id++)
    {
        if(!
is_user_alive(id))
            continue;
        
        
strip_user_weapons(id);
        
set_pdata_int(idOFFSET_PRIMARYWEAPON0);
        
give_item(id"weapon_knife");
        
set_user_maxspeed(id0.00001);
    }



superang 08-28-2009 10:38

Re: Drop all weapons on round end
 
na dont work that :S
Because if he was weapon he dont drop and he can move


All times are GMT -4. The time now is 20:13.

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