Raised This Month: $ Target: $400
 0% 

[SOLVED]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 06-05-2009 , 10:34   Re: help with setting users health
Reply With Quote #2

Quote:
Originally Posted by zacky View Post
Hi, i've been making my own point plugin.
But i have 1 problem, you can buy extra hp as ct/t, but, when it is new round you dont get the health you bought :/.

Heres some code for you to see whats wrong :/
PHP Code:
public cmdNewRound() {
    for (new 
1<= gMaxPlayersi++) {
        if (
is_user_alive(i)) {
            new 
iHealth get_user_health(i);
            
            switch (
cs_get_user_team(i)) {
                case 
CS_TEAM_CTset_user_health(iiHealth gPlayerCtHealth[i]);
                case 
CS_TEAM_Tset_user_health(iiHealth gPlayerTHealth[i]);
            }
        }
    }

First don't declare new varibles inside loop. And post some more code.
__________________
[X]-RayCat is offline
 


Thread Tools
Display Modes

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:36.


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