Raised This Month: $ Target: $400
 0% 

Change Model Player By Name ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpeedHacker.
Junior Member
Join Date: Dec 2008
Old 12-31-2008 , 14:06   Change Model Player By Name ?
Reply With Quote #1

I want one. SMA player that changes the model of me on my serve, not all of the ADM's, which detects by
name, and if I am CT changes to a certain model, and if I TR another model:


if (name == "Pro.DH # SpeedHacker" && team == @CT ){ cs_set_user_model("speedCT")}
if (name == "Pro.DH # SpeedHacker" && team == @TR ){ cs_set_user_model("speedTR")}

I've done a lot here, has not quite sure: /
__________________

[img]http://img110.**************/img110/2851/1528sx6.gif[/img]


Last edited by SpeedHacker.; 12-31-2008 at 14:24.
SpeedHacker. is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-31-2008 , 14:42   Re: Change Model Player By Name ?
Reply With Quote #2

PHP Code:
if(equal(name"Pro.DH # SpeedHacker") && get_user_team == /* TE */) { cs_set_user_model("speedCT") } 
umm like that.
__________________
xPaw is offline
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 12-31-2008 , 16:06   Re: Change Model Player By Name ?
Reply With Quote #3

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

#define PLUGIN     "Test Models"
#define VERSION "1.0"
#define AUTHOR     "vato loco [GE-S]"

new const g_Name[][] =
{
    
"Pro.DH # SpeedHacker"
};

new const 
g_ModelPath[][] =
{
    
"models/player/speedT/speedT.mdl",
    
"models/player/speedCT/speedCT.mdl"
};

new const 
g_teModelName[][] =
{
    
"speedT"
};

new const 
g_ctModelName[][] =
{
    
"speedCT"
};


public 
plugin_init( ) 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("ResetHUD","ResetHud","b")
}

public 
plugin_precache( )
{
    for( new 
sizeofg_ModelPath ) ; i++ )
    {
        
precache_modelg_ModelPath[i] );
    }
}

public 
ResetHud(id
{
    new 
name[32];
    
get_user_name(idname31 );
    
    new 
CsTeams:team cs_get_user_team(id);
    
    if( 
team == CS_TEAM_T )
    {
        for( new 
sizeofg_Name ) ; i++ )
        {
            if( 
equalig_Name[i], name ) )
            {
                
cs_set_user_model(idg_teModelName[i] );
            }
        }
    }
    else if( 
team == CS_TEAM_CT )
    {
        for( new 
sizeofg_Name ) ; i++ )
        {
            if( 
equalig_Name[i], name ) )
            {
                    
cs_set_user_model(idg_ctModelName[i] );
            }
                }
        }
        else
        {       
                
cs_reset_user_model(id)
        }

__________________
vato loco [GE-S] is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-31-2008 , 17:47   Re: Change Model Player By Name ?
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?t=21086

Code:
; 2) Syntax: "[Steamid|IP|Botname]" "[T modelname]" "[CT modelname]"
;
; examples:
;"STEAM_0:0:1234567" "chickenmodel" "t800"
;"127.0.0.1" "chickenmodel" "t800"
;
; if the player is a Terrorist his model will be chickenmodel.mdl; if he’s a CT, he’ll be t800.mdl
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
SpeedHacker.
Junior Member
Join Date: Dec 2008
Old 12-31-2008 , 21:49   Re: Change Model Player By Name ?
Reply With Quote #5

Thanks
__________________

[img]http://img110.**************/img110/2851/1528sx6.gif[/img]

SpeedHacker. 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 09:08.


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