Raised This Month: $ Target: $400
 0% 

can anyone help me....plz


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Des12
Senior Member
Join Date: Jan 2005
Old 03-09-2006 , 17:15   Re: can anyone help me....plz
Reply With Quote #2

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Same IP Same Team" #define VERSION "1.0" #define AUTHOR "martins" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_cvar("amx_sameIPsameTeam","1")     register_logevent( "Event_RoundStart", 2, "0=World triggered", "1=Round_Start" )     } public Event_RoundStart(){         if((get_cvar_num("amx_sameipsameteam") == 1)){                new players[32],ip[32][32],name[32][32]        new playerscount,total_count = 0,ct_count = 0,t_count = 1,m=0,n        get_players(players,playerscount,"c")           for( new i = 0 ; i <playerscount ; i++) {         get_user_ip(players[i],ip[i],31) //get IP         console_print(0,"ip[ %i ] is %s",i,ip[i])        }        for (new a = 0;a<playerscount;a++){ //get IP[a] from 1 to x         for (new b = a+1;b<playerscount;b++){  //get ip[b] from 2 to x             if (equali(ip[a],ip[b])) { //ip is same                n = a                get_user_name(players[b],name[m],31)                m = m + 1                total_count = total_count + 1                }        }        get_user_name(players[n],name[m],31)        for(new j=0;j<=m;j++){         new aa = get_user_index(name[j])         new CsTeams:userTeam = cs_get_user_team(players[aa])         if (userTeam == CS_TEAM_CT) {             ct_count = ct_count + 1         }         else if (userTeam == CS_TEAM_T){             t_count = t_count + 1         }        }        if (ct_count >= t_count){            for(new x=0;x<=m;x++){             new bb = get_user_index(name[x])             cs_set_user_team(bb,2)             client_print(0,print_chat,"players %s change team for same ip: %s",name[x],ip[n])        }        }else{         for(new y=0;y<=m;y++){             new cc = get_user_index(name[y])             cs_set_user_team(cc,1)             client_print(0,print_chat,"players %s change team for same ip: %s",name[y],ip[n])              }        }       }     return PLUGIN_HANDLED }
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 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 20:16.


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