Raised This Month: $ Target: $400
 0% 

Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GmTx
BANNED
Join Date: May 2009
Location: Mountains [BG/Sofia]
Old 08-20-2009 , 05:11   Help
Reply With Quote #1

Can somebody tell me does i rightly scripted admin and player models and admin connect msg
PHP Code:
/* 

The plugind was made by GmTx.It allow you to change the models in game 

Friends:
nKz|lAmZz (Bulgaria)
nKz|sHaDoW (Bulgaria)
LuKeE (Bulgaria)
HusTLeR (Bulgaria)
Volkon(Bulgaria)
.:K@sP@R40 ;] (Bulgaria)
coolch0 ;] (Bulgaria)

Special thanks to UCTT.info

    -----------------
    -*- Changelog -*-
    -----------------
* 1.0 
- firs relise 
- models of players

* 1.1
- fix wait a round until models get changed    

* 1.2 
- add a cvar enable/distable plugin


*/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "Player Models Changer - Test"
#define VERSION "1.2"
#define AUTHOR "GmTx"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Spawn"player""PlayerSpawn"1)
    
register_cvar("AMX_Models""1.0"FCVAR_SERVER)    
    
register_cvar("amx_playermodels","1")    
    
register_cvar("amx_adminmodels","1")        
    return 
PLUGIN_CONTINUE
}

public 
plugin_precache() 
{
///Terrorist models    
        
precache_model("models/player/new_terror/new_terror.mdl")
        
precache_model("models/player/new_leet/new_leet.mdl")
        
precache_model("models/player/new_arctic/new_arctic.mdl")
        
precache_model("models/player/new_guerilla/new_guerilla.mdl")       
///Counter terrorist models
        
precache_model("models/player/new_urban/new_urban.mdl")
        
precache_model("models/player/new_gsg9/new_gsg9.mdl")
        
precache_model("models/player/new_sas/new_sas.mdl")
        
precache_model("models/player/new_gign/new_gign.mdl")
///Admin Models     
        
precache_model("models/player/admin_te/admin_te.mdl")
        
precache_model("models/player/admin_ct/admin_ct.mdl")
    
        return 
PLUGIN_CONTINUE
}

public 
PlayerSpawn(id
{
    
set_task(1.0"setPlayerModels"id)
    
set_task(1.0"setAdminModels"id)    
        
    return 
PLUGIN_HANDLED
}
    
public 
setPlayerModels(id
{
    {
        new 
iCvar get_cvar_num"amx_playermodels" );
        
        new 
CsTeams:iTeam cs_get_user_teamid );
        
        switch( 
iTeam ) {
            case 
CS_TEAM_T: {
                switch( 
iCvar ) {
                    case 
1cs_set_user_modelid"new_terror" );
                    case 
2cs_set_user_modelid"new_leet" );
                    case 
3cs_set_user_modelid"new_arctic" );
                    case 
4cs_set_user_modelid"new_guerilla" );            
                }
            }
            case 
CS_TEAM_CT: {
                switch( 
iCvar ) {
                    case 
1cs_set_user_modelid"new_urban" );
                    case 
2cs_set_user_modelid"new_gsg9" );
                    case 
3cs_set_user_modelid"new_sas" );
                    case 
4cs_set_user_modelid"new_gign" );            
                }
            }
        }
    }
}  

public 
setAdminModels(id
{
    if( 
get_user_flagsid ) & ADMIN_BAN 
    {
        new 
iCvar get_cvar_num"amx_adminmodels" );
        
        new 
CsTeams:iTeam cs_get_user_teamid );
        
        switch( 
iTeam ) {
            case 
CS_TEAM_T: {
                switch( 
iCvar ) {
                    case 
1cs_set_user_modelid"admin_te" );
                }
            }
            case 
CS_TEAM_CT: {
                switch( 
iCvar ) {
                    case 
1cs_set_user_modelid"admin_ct" );
                }
            }
        }
    }

PHP Code:
#include <amxmodx>
#include <colorchat>

#define PLUGIN        "Admin Connect Message"
#define VERSION       "1.0"
#define AUTHOR        "GmTx"

public plugin_init() {
    
register_pluginPLUGINVERSIONAUTHOR );
}

public 
client_putinserverid ) {
    if( !
is_user_bot(id) ) {
        new 
name[32];
        
get_user_name(idname31);
        
        if( 
get_user_flags(id) & ADMIN_CVAR )
           
ColorChat(0RED"^x01[^x04KreedZ^x01] ^x03Head Admin^x01(%s)^x03has join the server!"name
        else
           
ColorChat(0RED"^x01[^x04KreedZ^x01] ^x03Head Admin^x01(%s)^x03has join the server!"name)
    }
}

public 
client_disconnectid ) {
    if( !
is_user_bot(id) ) {
        new 
name[32];
        
get_user_name(idname31);
        
        if( 
get_user_flags(id) & ADMIN_CVAR )
           
ColorChat(0RED"^x01[^x04KreedZ^x01] ^x03Head Admin^x01(%s)^x03has disconnect!"name)
        else
           
ColorChat(0RED"^x01[^x04KreedZ^x01] ^x03Head Admin^x01(%s)^x03has disconnect!"name)
    }

GmTx is offline
Send a message via Skype™ to GmTx
 



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:16.


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