Raised This Month: $ Target: $400
 0% 

Weapon strip on new round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iknowiz58
Member
Join Date: Sep 2006
Old 01-25-2009 , 12:32   Weapon strip on new round
Reply With Quote #1

Could anyone please make me a plugin that strips a team's weapons (type) when they spawn

The reason I am asking this it because I would like terrorists to spawn with nothing but a knife on a jailbreak map in condition zero.

I tried to use this but somehow they keep getting glocks each round, and if the round would end and the terrorists won, they would keep the guns they picked up last round.


Quote:
Originally Posted by iknowiz58 View Post
can anyone please make me a plugin that simply does this?

i would like to use it for a jailbreak map on czero

i started using this http://forums.alliedmods.net/showthread.php?t=10645 but it seems to not work.
__________________


Last edited by iknowiz58; 01-25-2009 at 13:40. Reason: to be more clear
iknowiz58 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-25-2009 , 12:46   Re: Weapon strip on new round
Reply With Quote #2

Quote:
Originally Posted by iknowiz58 View Post
can anyone please make me a plugin that simply does this?

i would like to use it for a jailbreak map on czero

i started using this http://forums.alliedmods.net/showthread.php?t=10645 but it seems to not work.
What weapons, if any, do you want the player to have on new round?
__________________
Bugsy is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-25-2009 , 13:08   Re: Weapon strip on new round
Reply With Quote #3

Haven't they fixed the Search Button!? It's weird how it's always broken...
SnoW is offline
Send a message via MSN to SnoW
iknowiz58
Member
Join Date: Sep 2006
Old 01-25-2009 , 13:35   Re: Weapon strip on new round
Reply With Quote #4

Quote:
Originally Posted by SnoW View Post
Haven't they fixed the Search Button!? It's weird how it's always broken...
that was rude. anywho I'll fix my post to be more clear
__________________

iknowiz58 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-25-2009 , 18:48   Re: Weapon strip on new round
Reply With Quote #5

Quote:
Originally Posted by iknowiz58 View Post
that was rude. anywho I'll fix my post to be more clear
It was not rude, you just need to use different search phrases when you search.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
iknowiz58
Member
Join Date: Sep 2006
Old 01-25-2009 , 20:01   Re: Weapon strip on new round
Reply With Quote #6

here is what I found searching but how do i make it team specific?

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
 
public plugin_init() {
        
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}
 

public  
fwHamPlayerSpawnPost(id) { 

    if(
is_user_alive(id) && !is_user_bot(id)) { 
        
fm_strip_user_weapons(id); 
        
fm_give_item(id"weapon_knife"); 
    } 

__________________

iknowiz58 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-25-2009 , 20:54   Re: Weapon strip on new round
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>

#define OFFSET_TEAM        114

enum CsTeams 
{
    
CS_TEAM_UNASSIGNED 0,
    
CS_TEAM_T,
    
CS_TEAM_CT,
    
CS_TEAM_SPECTATOR 
}

public 
plugin_init() 
{
        
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}
 

public  
fwHamPlayerSpawnPost(id

    if(
is_user_alive(id) && (fm_cs_get_user_team(id) == CS_TEAM_T) && !is_user_bot(id)) 
    { 
        
fm_strip_user_weapons(id); 
        
fm_give_item(id"weapon_knife"); 
    } 
}  

public 
CsTeams:fm_cs_get_user_team(id)
{
    return 
CsTeams:get_pdata_int(idOFFSET_TEAM);

__________________
Bugsy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-25-2009 , 13:35   Re: Weapon strip on new round
Reply With Quote #8

Here are the tools you will need:

Describes how to catch New Round:
http://forums.alliedmods.net/showthr...ght=mess+round

Get fakemeta_util, it has fm_strip_user_weapons() and fm_give_item().
http://forums.alliedmods.net/showthr...kemeta+utility

At new round, you can then:

fm_strip_user_weapons(id);

then, if you want.

fm_give_item( id , "weapon_shield" );
__________________
Bugsy 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 01:26.


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