Raised This Month: $ Target: $400
 0% 

models only for Coutner-Terrorists?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
drakeris
Senior Member
Join Date: Jul 2009
Old 09-27-2009 , 13:12   models only for Coutner-Terrorists?
Reply With Quote #1

when i think abouti tm ore i still canot find the right codes to put on t`s(terrorists) models for example alien mdoel is this possible to only do this on terrorist only?

Last edited by drakeris; 10-02-2009 at 13:28.
drakeris is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-27-2009 , 15:23   Re: models only for terrorist?
Reply With Quote #2

Probably possible with Player Model.
__________________
Arkshine is offline
drakeris
Senior Member
Join Date: Jul 2009
Old 09-28-2009 , 09:18   Re: models only for terrorist?
Reply With Quote #3

so you mean if i set for example this command:
set_player_model ( index, [ model = "" ] ) it would help?
or rather i should use this command:
ns_set_player_model ( index, [ model[] = "" ] )?
so the final look should be if i choose 2 choise it would be like this:
ns_set_player_model (id, [model[artic] = "alienub"])?
drakeris is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-28-2009 , 10:15   Re: models only for terrorist?
Reply With Quote #4

Code:
#include <amxmodx> #include <hamsandwich> #include <cstrike>   new const g_TerroristModel[] = "models/player/modelname/modelname.mdl";   public plugin_precache()         precache_model(g_TerroristModel);   public plugin_init()         RegisterHam(Ham_Spawn, "player", "PlayerSpawn", 1);   public PlayerSpawn(Client) {         if (!is_user_alive(Client) && cs_get_user_team(Client) == CS_TEAM_T)                 return;           cs_set_user_model(Client, g_TerroristModel); }
You can take a look at tutorials section for more efficient ways.
__________________

Last edited by hleV; 09-28-2009 at 10:51. Reason: Fixed.
hleV is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 09-28-2009 , 10:17   Re: models only for terrorist?
Reply With Quote #5

PHP Code:
if (!is_user_alive(Client))
        return; 

PHP Code:
if (!is_user_alive(Client) && get_user_team(Client) != 1)
        return; 
__________________
alan_el_more is offline
drakeris
Senior Member
Join Date: Jul 2009
Old 09-28-2009 , 10:26   Re: models only for terrorist?
Reply With Quote #6

Quote:
Originally Posted by hleV View Post
Code:
#include <amxmodx> #include <hamsandwich> #include <cstrike>   new const g_TerroristModel[] = "models/player/modelname/modelname.mdl";   public plugin_precache()         precache_model(g_TerroristModel);   public plugin_init()         RegisterHam(Ham_Spawn, "player", "PlayerSpawn", 1);   public PlayerSpawn(Client) {         if (!is_user_alive(Client))                 return;           cs_set_user_model(Client, g_TerroristModel); }

You can take a look at tutorials section for more efficient ways.
this code only changes a model for all terrorist? with one model?
drakeris is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 09-28-2009 , 10:35   Re: models only for terrorist?
Reply With Quote #7

Quote:
Originally Posted by drakeris View Post
this code only changes a model for all terrorist? with one model?
Is that what you want?
__________________
alan_el_more is offline
drakeris
Senior Member
Join Date: Jul 2009
Old 09-28-2009 , 10:49   Re: models only for terrorist?
Reply With Quote #8

Quote:
Originally Posted by alan_el_more View Post
Is that what you want?
well thats not what i had in mind i had in mind like changing all terrorit player models
BTW that code crashes server :/
drakeris is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-28-2009 , 10:51   Re: models only for terrorist?
Reply With Quote #9

Above code fixed. Don't forget to change the "modelname" to the one you want. The model must be in server.
__________________
hleV is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-28-2009 , 10:52   Re: models only for terrorist?
Reply With Quote #10

Quote:
Originally Posted by alan_el_more View Post
PHP Code:
if (!is_user_alive(Client))
        return; 

PHP Code:
if (!is_user_alive(Client) && get_user_team(Client) != 1)
        return; 
!=1 wouldnt work ither


cuz 1 = Terror 2= CT

but there is spectate and
non assigned.

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

new const g_TerroristModel[] = "models/player/modelname/modelname.mdl";

public 
plugin_precache()
    
precache_model(g_TerroristModel);

public 
plugin_init()
    
RegisterHam(Ham_Spawn"player""PlayerSpawn"1);

public 
PlayerSpawn(Client)
{
    if (
is_user_alive(Client))
    {
        if(
cs_get_user_team(Client) == CS_TEAM_T)
        {
            
cs_set_user_model(Clientg_TerroristModel);
        }
    }

Doc-Holiday 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 22:38.


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