Raised This Month: $ Target: $400
 0% 

Verify online users.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 10-06-2010 , 15:34   Re: Verify online users.
Reply With Quote #7

Quote:
Originally Posted by killergirl View Post
PHP Code:
#include <amxmodx>
#include <cstrike>

new t_Score;
new 
ct_Score;

public 
plugin_init(){
    
register_plugin("CT T Switch""1.0""Author")
    
    
register_event("DeathMsg""deathmsgevent""a")
}

public 
deathmsgevent(){
    
    new 
iKiller read_data(1)
    new 
iKillertwo read_data(1)
    
    if( 
get_user_team(iKiller) == )
    {
        
t_Score++
        
        if( 
t_Score == 10 )
        {
            if(
get_user_team(iKiller) == CS_TEAM_T){
                
cs_set_user_team(iKiller,CS_TEAM_CT)
                
cs_set_user_team(iKillertwo,CS_TEAM_T)
            }
            else{
                
client_print(0print_chat"Something is wrong! TERRORIST")
            }
        }
        else{
            return 
PLUGIN_CONTINUE;
        }
    }
    if( 
get_user_team(iKillertwo) == )
    {
        
ct_Score++
        
        if( 
ct_Score == 10 )
        {
            if(
get_user_team(iKillertwo) == CS_TEAM_CT){
                
cs_set_user_team(iKiller,CS_TEAM_CT)
                
cs_set_user_team(iKillertwo,CS_TEAM_T)
            }
            else{
                
client_print(0print_chat"Something is wrong! CT")
            }
        }
        else{
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;

I don't know is this ok, or maybe I need to change here?
PHP Code:
###
if(get_user_team(iKiller) == CS_TEAM_T)
###
if(get_user_team(iKillertwo) == CS_TEAM_CT)
### 
with:
PHP Code:
###
if(get_user_team(iKiller) == 1)
###
if(get_user_team(iKillertwo) == 1)
### 
You only need one iKiller. It will get a new killer every time, don't worry.

To get the victim, use something like

new iVictim = read_data(2)
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX 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 10:28.


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