Raised This Month: $ Target: $400
 0% 

Respawn Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 11-12-2011 , 06:22   Respawn Problem
Reply With Quote #1

Hi. I'm trying to respawn a player that is already dead when i kill someone. Part of the code doesn't work and i don't know why.

PHP Code:
                iTeam get_user_teamiAttacker );
                new 
players[32], numberofplayerscount 0;
                
get_playersplayersnumberofplayers"a" );
                for ( 
0numberofplayersi++ )
                {
                    
iTargetID players[i];
                    
                    
// Make sure player is on the same team
                    
if ( get_user_teamiTargetID ) == iTeam )
                    {
                        
                        if ( !
is_user_aliveiTargetID ) && iTargetID != iAttacker )
                        {
                        
count++
                        
                        }
                    
                    

                    }
                    if ( 
count <= )
                    {
                    
ExecuteHamB(Ham_CS_RoundRespawn,iTargetID);
                    }
                } 
if i delete -> if ( !is_user_alive( iTargetID ) it spawns only alive players on my team. What did i do wrong ?
EDUTz is offline
 



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 08:25.


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