Raised This Month: $ Target: $400
 0% 

[REQ]10 Seconds no Gun's


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpokY
Senior Member
Join Date: Feb 2009
Location: Darmstadt
Old 06-10-2009 , 11:37   Re: [REQ]10 Seconds no Gun's
Reply With Quote #1

works fine =) Thanks all
__________________
xtream.eSports Weil's einfach nur Geil ist !
www.xtream-esports.com
SpokY is offline
Send a message via ICQ to SpokY Send a message via MSN to SpokY
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-10-2009 , 12:25   Re: [REQ]10 Seconds no Gun's
Reply With Quote #2

PHP Code:
[color=#ff8000]#include <amxmodx>[/color]
[color=#ff8000][color=#ff8000]#include <hamsandwich>[/color]
[color=#ff8000]#include <fun>[/color]
[color=#ff8000]#include <cstrike>[/color]
[color=#ff8000][/color]
[color=#ff8000]#define PLUGIN "New Plug-In"[/color]
[color=#ff8000]#define VERSION "1.0"[/color]
[color=#ff8000]#define AUTHOR "TitANious"[/color]
[color=#ff8000][/color]
[color=#ff8000][/color]
[color=#ff8000]public plugin_init() {[/color]
[color=#ff8000]    register_plugin(PLUGIN, VERSION, AUTHOR)[/color]
[color=#ff8000]    [/color]
[color=#ff8000]    RegisterHam ( Ham_Spawn, "player", "fwSpawn", 1 );[/color]
[color=#ff8000]}[/color]
[color=#ff8000]public fwSpawn ( id )[/color]
[color=#ff8000]{[/color]
[color=#ff8000]    if ( is_user_alive ( id ) )[/color]
[color=#ff8000]    {[/color]
[color=#ff8000]        strip_user_weapons ( id )[/color]
[color=#ff8000]        [/color]
[color=#ff8000]        set_task ( 10.0, "GiveWeapons", id )[/color]
[color=#ff8000]    }[/color]
[color=#ff8000]}[/color]
[color=#ff8000]public GiveWeapons ( id )[/color]
[color=#ff8000]{[/color]
[color=#ff8000]    give_item ( id, "weapon_knife" );[/color]
[color=#ff8000]    new team = get_user_team( id );[/color]
[color=#ff8000]    if ( team == 2 )[/color]
[color=#ff8000]    {[/color]
[color=#ff8000]        give_item ( id, "weapon_usp" );[/color]
[color=#ff8000]        cs_set_user_bpammo ( id, CSW_USP, 100 )[/color]
[color=#ff8000]    }[/color]
[color=#ff8000]    else if ( team == 1 )//else can be enough[/color]
[color=#ff8000]    {[/color]
[color=#ff8000]        give_item ( id, "weapon_glock18" );[/color]
[color=#ff8000]        cs_set_user_bpammo ( id, CSW_GLOCK18, 100 )[/color]
[color=#ff8000]    }[/color]
[color=#ff8000]}[/color]
[color=#ff8000][/color][/color] 
Creating variable is better than 2 module calls, also you were giving wrong weapons to wrong teams.
Edit: I really hate when the php tags bug those colors, maybe I'll get along with it.

Last edited by SnoW; 06-10-2009 at 12:28.
SnoW is offline
Send a message via MSN to SnoW
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-10-2009 , 10:52   Re: [REQ]10 Seconds no Gun's
Reply With Quote #3

You are right
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "TitANious"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam Ham_Spawn"player""fwSpawn" );
}
public 
fwSpawn id )
{
    if ( 
is_user_alive id ) )
    {
        
strip_user_weapons id )
        
        
set_task 10.0"GiveWeapons"id )
    }
}
public 
GiveWeapons id )
{
    
give_item id"weapon_knife" );
    
    if ( 
get_user_team id ) == )
    {
        
give_item id"weapon_usp" );
        
cs_set_user_bpammo idCSW_USP100 )
    }
    else if ( 
get_user_team id ) == 2)
    {
        
give_item id"weapon_glock18" );
        
cs_set_user_bpammo idCSW_GLOCK18100 )
    }

__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 06-10-2009 , 11:14   Re: [REQ]10 Seconds no Gun's
Reply With Quote #4

PHP Code:
RegisterHam Ham_Spawn"player""fwSpawn" ); 


PHP Code:
RegisterHam Ham_Spawn"player""fwSpawn"1); 
__________________
alan_el_more is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-10-2009 , 11:20   Re: [REQ]10 Seconds no Gun's
Reply With Quote #5

It is working with out the 1?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
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 23:33.


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