Raised This Month: $ Target: $400
 0% 

Solved Model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 07-21-2019 , 06:54   Model
Reply With Quote #1

Why do not I see the MODEL that I also set up on CT?
PHP Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "Player Models"
#define VERSION "1.0b"
#define AUTHOR "CheezPuff"

new const g_szModelsCT[ ] = "models/player/CTSkin/CTSkin.mdl"// Counte-Terrorists Model
new const g_szModelsT[ ] = "models/player/TSkin/TSkin.mdl"// Terrorists Model

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Spawn"player""fw_spawn"1);
}

public 
plugin_precache()
{
    
precache_modelg_szModelsCT );
    
precache_modelg_szModelsT );


public 
fw_spawnIndex )
{
    if( !
is_user_aliveIndex ) || is_user_botIndex ) )
        return;
    
    if( 
cs_get_user_teamIndex ) == CS_TEAM_CT )
    {
        
cs_set_user_modelIndex"g_szModelsCT" );
    }
    
    if( 
cs_get_user_teamIndex ) == CS_TEAM_T )
    {
        
cs_set_user_modelIndex"g_szModelsT" );
    }
    else 
cs_reset_user_modelIndex );


Last edited by Fuck For Fun; 07-21-2019 at 12:40.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-21-2019 , 07:23   Re: Model
Reply With Quote #2

Because after you set it, you're checking (again) if the user is a terrorist, and if he's not (which he obviously isn't), you're reseting his model.

In simple words, this part of the code will ALWAYS run if the player is CT:

PHP Code:
else cs_reset_user_modelIndex ); 
__________________

Last edited by OciXCrom; 07-21-2019 at 07:24.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 07-21-2019 , 07:33   Re: Model
Reply With Quote #3

Yes, that's what I noticed, and I removed it, and still not

tried this:
PHP Code:
public fw_spawnIndex )
{
    if( !
is_user_aliveIndex ) || is_user_botIndex ) )
        return;
   
    if (
cs_get_user_teamIndex ) == CS_TEAM_CTcs_set_user_modelIndex"g_szModelsCT")
   
    else if (
cs_get_user_teamIndex ) == CS_TEAM_Tcs_set_user_modelIndex"g_szModelsT")

Quote:
Error: could not load file models/player/g_szModelsT/g_szModelsT.mdl
EDIT: Fixed i dont know why should i set my folder mdl on this lines:
PHP Code:
public fw_spawnIndex )
{
    if( !
is_user_aliveIndex ) || is_user_botIndex ) )
        return;

    if( 
cs_get_user_teamIndex ) == CS_TEAM_CT )
    {
        
cs_set_user_modelIndex"CTSkin" );
    }

    else if( 
cs_get_user_teamIndex ) == CS_TEAM_T )
    {
        
cs_set_user_modelIndex"TSkin" );
    }


Last edited by Fuck For Fun; 07-21-2019 at 07:42.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
baby.exe
Junior Member
Join Date: Jul 2019
Old 07-21-2019 , 07:42   Re: Model
Reply With Quote #4

Yoo,, try mine. it'll work! so easy tho.
https://www.mediafire.com/file/0hl7x.../baby.rar/file
baby.exe is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-21-2019 , 08:04   Re: Model
Reply With Quote #5

Quote:
Originally Posted by baby.exe View Post
Yoo,, try mine. it'll work! so easy tho.
https://www.mediafire.com/file/0hl7x.../baby.rar/file
Either post the .sma file or don't post at all.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 17:31.


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