Raised This Month: $ Target: $400
 0% 

[HELP] Round Number


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trickzz
Member
Join Date: Jun 2011
Old 06-19-2011 , 17:01   [HELP] Round Number
Reply With Quote #1

How to make a round if for example 3, the players were given the AWP Magnum. And if the round 10 players were given a Deagle

PHP Code:
#include <amxmodx>
#include <amxmisc>

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

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""event_round_start""a""1=0""2=0")
}

public 
event_round_start()
{
    
round_number++

Trickzz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2011 , 17:21   Re: [HELP] Round Number
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>

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

new round_number

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""event_round_start""a""1=0""2=0")
}

public 
event_round_start()
{
    
round_number++
    
    switch(
round_number)
    {
        case 
3:
        {
            
// use get_players() and loop through all players
            // use give_item() with "weapon_awp"
        
}
        case 
10:
        {
            
// use get_players() and loop through all players
            // use give_item() with "weapon_deagle"
        
}
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 06-19-2011 , 17:39   Re: [HELP] Round Number
Reply With Quote #3

don't forget to include fun if your gonna use "give_item"
Erox902 is offline
Trickzz
Member
Join Date: Jun 2011
Old 06-19-2011 , 18:35   Re: [HELP] Round Number
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>

#define PLUGIN "Advanced Rounds"
#define VERSION "1.0"
#define AUTHOR "Trickz"

new g_Health

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
g_Health register_cvar("ar_firstround_hp""30");        
    
    
g_maxplayers=get_maxplayers() 
    
         new 
iEntity    
    
while( ( iEntity find_ent_by_classiEntity"func_buyzone" ) ) > )
       
       if( 
entity_get_intiEntityEV_INT_iuser1 ) != 1337 )
            
remove_entityiEntity );
}

public 
plugin_precache() 
{
    new 
iEntity create_entity"func_buyzone" );
    
    if( 
iEntity ) {
        
entity_set_sizeiEntityFloat:{ -4096.0, -4096.0, -4096.0 }, Float:{ -4095.0, -4095.0, -4095.0 } );
        
entity_set_intiEntityEV_INT_iuser11337 );
    }
}

public 
event_round_start()
{
    
round_number++
    
    switch(
round_number)
    {
        case 
1:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_knife"
                       
set_user_health(id"30" get_pcvar_num(g_Health));
        }
        case 
2:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_glock18")
        }
        case 
3:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_usp")
        }
        case 
4,5:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_deagle")
        }
    }



Everbody, can help me?
Attached Thumbnails
Click image for larger version

Name:	Image 004.png
Views:	279
Size:	19.4 KB
ID:	87700  
Trickzz is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 06-19-2011 , 20:10   Re: [HELP] Round Number
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>

#define PLUGIN "Advanced Rounds"
#define VERSION "1.0"
#define AUTHOR "Trickz"

new g_maxplayers //you forgot this
new round_number //and this
new g_Health

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
g_Health register_cvar("ar_firstround_hp""30");        
    
    
g_maxplayers=get_maxplayers() 
    
         new 
iEntity    
    
while( ( iEntity find_ent_by_classiEntity"func_buyzone" ) ) > )
       
       if( 
entity_get_intiEntityEV_INT_iuser1 ) != 1337 )
            
remove_entityiEntity );
}

public 
plugin_precache() 
{
    new 
iEntity create_entity"func_buyzone" );
    
    if( 
iEntity ) {
        
entity_set_sizeiEntityFloat:{ -4096.0, -4096.0, -4096.0 }, Float:{ -4095.0, -4095.0, -4095.0 } );
        
entity_set_intiEntityEV_INT_iuser11337 );
    }
}

public 
event_round_start()
{
    
round_number++
    
    switch(
round_number)
    {
        case 
1:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons(i)
                  
give_item(i"weapon_knife")
                  
/*and what the hell is this "set_user_health(i, "30" + get_pcvar_num(g_Health));"?

                  if you want players to have 30 hp uncomment this below*/
                  //set_user_health(i, get_pcvar_num(g_Health));

                 //or if you want 30 hp MORE, then uncomment this
                 //set_user_health(i, get_user_health(i) += get_pcvar_num(g_Health));
        
}
        case 
2:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons(i)
                  
give_item(i"weapon_glock18"//not id
        
}
        case 
3:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons(i)
                  
give_item(i"weapon_usp")
        }
        case 
4,5:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons(i)
                  
give_item(i"weapon_deagle")
        }
    }


Last edited by Erox902; 06-19-2011 at 21:40. Reason: updated
Erox902 is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 06-19-2011 , 20:13   Re: [HELP] Round Number
Reply With Quote #6

Quote:
Originally Posted by Erox902 View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>

#define PLUGIN "Advanced Rounds"
#define VERSION "1.0"
#define AUTHOR "Trickz"

new g_maxplayers //you forgot this
new round_number //and this
new g_Health

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
g_Health register_cvar("ar_firstround_hp""30");        
    
    
g_maxplayers=get_maxplayers() 
    
         new 
iEntity    
    
while( ( iEntity find_ent_by_classiEntity"func_buyzone" ) ) > )
       
       if( 
entity_get_intiEntityEV_INT_iuser1 ) != 1337 )
            
remove_entityiEntity );
}

public 
plugin_precache() 
{
    new 
iEntity create_entity"func_buyzone" );
    
    if( 
iEntity ) {
        
entity_set_sizeiEntityFloat:{ -4096.0, -4096.0, -4096.0 }, Float:{ -4095.0, -4095.0, -4095.0 } );
        
entity_set_intiEntityEV_INT_iuser11337 );
    }
}

public 
event_round_start()
{
    
round_number++
    
    switch(
round_number)
    {
        case 
1:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_knife"
                       
set_user_health(id"30" get_pcvar_num(g_Health));
        }
        case 
2:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_glock18")
        }
        case 
3:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_usp")
        }
        case 
4,5:
        {
             new 
players[32], playerpnum;
             
get_players(playerspnum"a");
             for(new 
0pnumi++) 
                  
player players[i];
                  
strip_user_weapons
                  give_item
(id"weapon_deagle")
        }
    }

You don't see anything wrong about "strip_user_weapons"? o_O
matsi is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 06-19-2011 , 21:22   Re: [HELP] Round Number
Reply With Quote #7

Quote:
Originally Posted by matsi View Post
You don't see anything wrong about "strip_user_weapons"? o_O
haha lol sry didn't see that just checked his screen print and saw the undefined smbols

----EDIT----
fixed it in the other post but noticed another thing... What the hell is case 4,5 Trickzz?

Last edited by Erox902; 06-19-2011 at 21:27.
Erox902 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-19-2011 , 22:46   Re: [HELP] Round Number
Reply With Quote #8

Quote:
Originally Posted by Erox902 View Post
What the hell is case 4,5 Trickzz?
It a case that gets executed for both round_number = 4 and round_number = 5.
__________________
fysiks is online now
Trickzz
Member
Join Date: Jun 2011
Old 06-20-2011 , 03:34   Re: [HELP] Round Number
Reply With Quote #9

case 4,5 - for round 4 and 5.
and i want, to in first round HP of all users will be 30HP, to next round 100hp..
Trickzz is offline
Trickzz
Member
Join Date: Jun 2011
Old 06-20-2011 , 03:46   Re: [HELP] Round Number
Reply With Quote #10

How to make a CVAR, on / off zone purchasing

PHP Code:
         new iEntity    
    
while( ( iEntity find_ent_by_classiEntity"func_buyzone" ) ) > )
       
       if( 
entity_get_intiEntityEV_INT_iuser1 ) != 1337 )
            
remove_entityiEntity ); 
PHP Code:
public plugin_precache() 
{
    new 
iEntity create_entity"func_buyzone" );
    
    if( 
iEntity ) {
        
entity_set_sizeiEntityFloat:{ -4096.0, -4096.0, -4096.0 }, Float:{ -4095.0, -4095.0, -4095.0 } );
        
entity_set_intiEntityEV_INT_iuser11337 );
    }

Trickzz 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 23:33.


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