Raised This Month: $ Target: $400
 0% 

Problem with variables


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MasterKy
Junior Member
Join Date: Aug 2009
Old 08-29-2009 , 17:31   Problem with variables
Reply With Quote #1

PHP Code:
public plugin_init()
{
   
register_plugin("P.M","1.0","MasterKy")

    
register_event("DeathMsg""EVENT_TakeDamage""be")
    
RegisterHam(Ham_TakeDamage"player""EVENT_TakeDamage")
        
}

public 
EVENT_TakeDamage(id){
new 
iPlayers32 ];
new 
iPlayerCount
get_players 
iPlayers iPlayerCount "a" "CS_TEAM_T" );
        if(
iPlayerCount == 1){
        
        }else
        if(
iPlayerCount == 2){
        new 
CsTeams:userTeam cs_get_user_team(id)
        if(
get_user_attacker(id)){
            if(
userTeam == CS_TEAM_T) {
            
cs_set_user_team(id,CS_TEAM_CT)
            
visivel(id)
            
ultimoPlayer()
            
modelPlayer()
                }
            }
        }else{
            
cs_set_user_team(id,CS_TEAM_CT)
            
visivel(id)
            
contaPlayersTimes()
            
client_print(0,print_chat"Hahaha. %s FOI PEGOOO!!!",id)
            
server_cmd("amx_execall spk misc/risamalo")
            }
        return 
PLUGIN_CONTINUE

It is an part of my plugin.
The terrorist player go to CT if he get attacked
If have only 2, it send 1 for CT and the last terrorist receive a CT Player Model.
When the last be attacked and killed, the game over.

but... THIS DONT WORK CORRECTLY

PHP Code:
    if(iPlayerCount == 2){ 
and
PHP Code:
    if(iPlayerCount == 1){ 
dont work!

Whats up?
plz help me!

Last edited by MasterKy; 08-29-2009 at 17:35.
MasterKy 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 15:01.


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