Raised This Month: $ Target: $400
 0% 

round start give health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 01-26-2013 , 20:28   round start give health
Reply With Quote #1

where is the problem?
compile is success.
however echo error by hlds.
[CSTRIKE] Player out og range (0)
[AMXX] Run time error 10 (plugin "round_start_give_health.amxx") "native "cs_get_user_team") - debug not enable!
what is this?

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

#define PLUGIN "Health Fix"
#define VERSION "1.0"
#define AUTHOR "AUTHOR"

#define T_ARMOR 155
#define T_HEALTH 155
#define CT_ARMOR 255
#define CT_HEALTH 255

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_logevent("RoundStart"2"1=Round_Start");
}

public 
RoundStart()
{
    new 
Players[32
    new 
playerCountiplayer 
    get_players
(PlayersplayerCount"b"
    for (
i=0i<playerCounti++) 
        
player Players[i
        
    if(
cs_get_user_team(player) == CS_TEAM_T) {
        
set_user_armor(playerT_ARMOR);
        
set_user_health(playerT_HEALTH);
    } else {
        
set_user_armor(playerCT_ARMOR);
        
set_user_health(playerCT_HEALTH);
    }
    return 
PLUGIN_HANDLED;


Last edited by RuRuRu612754; 01-26-2013 at 20:29.
RuRuRu612754 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-26-2013 , 21:50   Re: round start give health
Reply With Quote #2

PHP Code:
get_players(PlayersplayerCount"b"


PHP Code:
get_players(PlayersplayerCount"a"
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 01-26-2013 , 22:00   Re: round start give health
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
PHP Code:
get_players(PlayersplayerCount"b"


PHP Code:
get_players(PlayersplayerCount"a"
thanks so much.
RuRuRu612754 is offline
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 01-26-2013 , 22:30   Re: round start give health
Reply With Quote #4

Quote:
Originally Posted by wickedd View Post
PHP Code:
get_players(PlayersplayerCount"b"


PHP Code:
get_players(PlayersplayerCount"a"
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "HNS Fix"
#define VERSION "1.0"
#define AUTHOR "k725"

#define T_ARMOR 155
#define T_HEALTH 155
#define CT_ARMOR 255
#define CT_HEALTH 255

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_logevent("RoundStart"2"1=Round_Start");
}

public 
RoundStart()
{
    new 
Players[32
    new 
playerCountiplayer 
    get_players
(PlayersplayerCount"a"
    for (
i=0i<playerCounti++) 
        
player Players[i
        
    if(
cs_get_user_team(player) == CS_TEAM_T) {
        
set_user_armor(playerT_ARMOR);
        
set_user_health(playerT_HEALTH);
    } else {
        
set_user_armor(playerCT_ARMOR);
        
set_user_health(playerCT_HEALTH);
    }
    
    return 
PLUGIN_HANDLED;

hmm... some error.
i think does not worked cs_get_user_team.
RuRuRu612754 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-26-2013 , 23:03   Re: round start give health
Reply With Quote #5

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

#define PLUGIN "HNS Fix"
#define VERSION "1.0"
#define AUTHOR "k725"

#define T_ARMOR 155
#define T_HEALTH 155
#define CT_ARMOR 255
#define CT_HEALTH 255

public plugin_init( ) 
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
register_logevent"RoundStart"2"1=Round_Start" );
}

public 
RoundStart( )
{
    new 
Players32 ], szNumi
    get_players
PlayersszNum"a" 
    
    for ( 
0szNumi++ ) 
    {    
        new 
player Players];
        
        if( 
cs_get_user_teamplayer ) == CS_TEAM_T 
        {
            
set_user_armorplayerT_ARMOR );
            
set_user_healthplayerT_HEALTH );
        } 
        else 
        {
            
set_user_armorplayerCT_ARMOR );
            
set_user_healthplayerCT_HEALTH );
        }
    }

__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 01-26-2013 at 23:41.
wickedd is offline
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 01-27-2013 , 02:24   Re: round start give health
Reply With Quote #6

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

#define PLUGIN "HNS Fix"
#define VERSION "1.0"
#define AUTHOR "k725"

#define T_ARMOR 155
#define T_HEALTH 155
#define CT_ARMOR 255
#define CT_HEALTH 255

public plugin_init( ) 
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
register_logevent"RoundStart"2"1=Round_Start" );
}

public 
RoundStart( )
{
    new 
Players32 ], szNumi
    get_players
PlayersszNum"a" 
    
    for ( 
0szNumi++ ) 
    {    
        new 
player Players];
        
        if( 
cs_get_user_teamplayer ) == CS_TEAM_T 
        {
            
set_user_armorplayerT_ARMOR );
            
set_user_healthplayerT_HEALTH );
        } 
        else 
        {
            
set_user_armorplayerCT_ARMOR );
            
set_user_healthplayerCT_HEALTH );
        }
    }

sorry><
i made ​​a miss simple.
thanks so much.
RuRuRu612754 is offline
Old 01-27-2013, 02:39
michal123
This message has been deleted by michal123. Reason: YamiKaitou, right my mistake ;)
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-27-2013 , 04:01   Re: round start give health
Reply With Quote #7

Quote:
Originally Posted by michal123 View Post
You must check, is player alive, because you give health and armor.
Using get_players with the 'a' flag will only return alive clients, no need to check if they are alive again.
__________________
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
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 14:26.


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