Raised This Month: $51 Target: $400
 12% 

cs_teams help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AvaStIn
Senior Member
Join Date: Feb 2013
Location: Algeria
Old 10-25-2013 , 07:43   cs_teams help
Reply With Quote #1

hello guys , i wanted to make a plugin that transfers terrorist to Ct when he says /swapme, and to work for Te team only,after that to choose a random player from Ct to replace him xD
this is the best i could..
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>



new const g_szPrefix[ ] = "[Deathrun]";


public 
plugin_init( ) {

    
register_plugin"terrorist swap""0.1""unknown" );
    
register_clcmd"say /swapme""Randromize" );
}


public 
Randromizeid ) {

    if( 
cs_get_user_teamid ) != CS_TEAM_T ) {
        
client_printidprint_chat"%s This command is only for terrorists!"g_szPrefix  );
        
        return 
PLUGIN_CONTINUE;
    }

    if( 
cs_get_user_teamid ) != CS_TEAM_CT ) {
        
cs_set_user_teamid CS_TEAM_CT )
        
spawnid )

        
client_printidprint_chat"%s u have been successfully swaped To Ct"g_szPrefix );

        return 
PLUGIN_CONTINUE;
    }
    
    new 
iRandomPlayer;
    
    if( 
cs_get_user_teamiRandomPlayer ) != CS_TEAM_T ) {
        
cs_set_user_team(iRandomPlayerCS_TEAM_T);

        new 
szName32 ];
        
get_user_nameiRandomPlayerszName31 );

    
client_print(0print_chat"%s %s is now new terrorist"g_szPrefixszName);
        
    }
    return 
PLUGIN_CONTINUE;

__________________
Project : Speedrun / Fastrun / CrazySpeed & [FPS CATEGORY]

o [
||||||||||||||||||||] - 95%

Project : Upgraded Drshop To V6.0

o [||||||||||||||||||||]- 100%
AvaStIn is offline
Reply



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 07:21.


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