AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   models only for Coutner-Terrorists? (https://forums.alliedmods.net/showthread.php?t=104782)

drakeris 09-27-2009 13:12

models only for Coutner-Terrorists?
 
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?

Arkshine 09-27-2009 15:23

Re: models only for terrorist?
 
Probably possible with Player Model.

drakeris 09-28-2009 09:18

Re: models only for terrorist?
 
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"])?

hleV 09-28-2009 10:15

Re: models only for terrorist?
 
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.

alan_el_more 09-28-2009 10:17

Re: models only for terrorist?
 
PHP Code:

if (!is_user_alive(Client))
        return; 

:arrow:
PHP Code:

if (!is_user_alive(Client) && get_user_team(Client) != 1)
        return; 


drakeris 09-28-2009 10:26

Re: models only for terrorist?
 
Quote:

Originally Posted by hleV (Post 945771)
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?

alan_el_more 09-28-2009 10:35

Re: models only for terrorist?
 
Quote:

Originally Posted by drakeris (Post 945783)
this code only changes a model for all terrorist? with one model?

Is that what you want?

drakeris 09-28-2009 10:49

Re: models only for terrorist?
 
Quote:

Originally Posted by alan_el_more (Post 945791)
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 :/

hleV 09-28-2009 10:51

Re: models only for terrorist?
 
Above code fixed. Don't forget to change the "modelname" to the one you want. The model must be in server.

Doc-Holiday 09-28-2009 10:52

Re: models only for terrorist?
 
Quote:

Originally Posted by alan_el_more (Post 945774)
PHP Code:

if (!is_user_alive(Client))
        return; 

:arrow:
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);
        }
    }




All times are GMT -4. The time now is 22:38.

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