Raised This Month: $ Target: $400
 0% 

Toggle Camouflage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 11-14-2010 , 13:55   Re: Toggle Camouflage
Reply With Quote #1

PHP Code:
#pragma semicolon 1

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

// Define the Plugin Version
new const VERSION[] = "1.0";

new 
boolg_bCamoflauge[33];

public 
plugin_init()
{
    
register_plugin("Camoflauge"VERSION"Shuttle_Wave");

    
register_clcmd("say !camenu""cmdCamoMenu"ADMIN_LEVEL_H);
    
register_clcmd("say /camenu""cmdCamoMenu"ADMIN_LEVEL_H);
    
    
register_menucmd(register_menuid("Camoflauge Menu"),    1023,    "CamoflaugeMenu_Handler");
}

public 
client_connect(id)
    
g_bCamoflauge[id] = false;

public 
cmdCamoMenu(id)
{
    static 
iLenszMenu[512], iKeys;
    
    
iKeys = ( MENU_KEY_0 MENU_KEY_1 );
    
    
iLen formatex(szMenusizeof(szMenu) - 1"\yCamoflauge Menu:^n\rby Shuttle_Wave^n^n");
    
    
iLen += formatex(szMenu[iLen], sizeof(szMenu) - iLen"\r1. \wCamoflauge [ \r%s\w ]^n"g_bCamoflauge[id] ? "ON" "OFF");
    
    
iLen += formatex(szMenu[iLen], sizeof(szMenu) - iLen"^n\r0. \wExit");
    
    
show_menu(idiKeysszMenu, -1"Camoflauge Menu");
    
    return 
PLUGIN_HANDLED;
}

public 
CamoflaugeMenu_Handler(idkey)
{
    switch(
key)
    {
        case 
0:
        {    
            if(
g_bCamoflauge[id])
            {
                
set_hudmessage(002550.080.8106.01.0);
                
show_hudmessage(id"Camoflauge Reseted");
                
                
cs_reset_user_model(id);
                
g_bCamoflauge[id] = false;
                
                
cmdCamoMenu(id);
                return 
PLUGIN_HANDLED;
            }
            
            if(!
g_bCamoflauge[id] && cs_get_user_team(id) == CS_TEAM_T)
            {
                
set_hudmessage(025500.030.8206.01.0);
                
show_hudmessage(id"You are now Camoflaged as CT");
                
                
cs_set_user_model(id"urban");
                
g_bCamoflauge[id] = true;
            }
            
            else if(!
g_bCamoflauge[id] && cs_get_user_team(id) == CS_TEAM_CT)
            {
                
set_hudmessage(4225500.040.8706.01.0);
                
show_hudmessage(id"You are now Camoflaged as Terrorist");
                
                
cs_set_user_model(id"leet");
                
g_bCamoflauge[id] = true;
            }
        }
        
        case 
9: return PLUGIN_HANDLED;
        
    }
    
    
cmdCamoMenu(id);
    
    return 
PLUGIN_HANDLED;

shuttle_wave 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 11:25.


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