Raised This Month: $51 Target: $400
 12% 

Solved half-life model when using player model api.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lexzor
Veteran Member
Join Date: Nov 2020
Old 08-08-2021 , 12:57   half-life model when using player model api.
Reply With Quote #1

Hello. I have a plugin that set and reset player models using this api : https://forums.alliedmods.net/showthread.php?t=161255

i reset player model at spawn then set it again in case the player choose another skin/ changed team.

The problem is that sometimes player model is a Half-Life model.

Screen: https://imgur.com/7idMX2X


Also i have more problems like:

- weapons floating at player spawn: https://imgur.com/7ti85js
- weapons are not respawning on maps like fy_snow
- overflow problem on players without having more than 4 hud msg at same time
- ERROR: couldn't open custom.hpk.


The problem started when i moved the server on another host (i didn't updated regamedll/rehlds just the amxx version because my mod have some problems.).

code:
PHP Code:
public plugin(initRegisterHam(Ham_Spawn"player""player_spawn_post"1);


public 
player_spawn_post(id)
{
    if(
is_user_alive(id))
    {
        
cs_reset_player_model(id);

        if((
get_user_team(id) == && g_iPlayerSkin[id][T] == NON_USED_SKIN) || (get_user_team(id) == && g_iPlayerSkin[id][CT] == NON_USED_SKIN))
        {
            return 
PLUGIN_HANDLED;
        }

        switch(
get_user_team(id))
        {
            case 
1:
            {
                new 
iSkin g_iPlayerSkin[id][T];
                
cs_set_player_model(idg_TSkin[iSkin][szCTSkin]);
            }

            case 
2:
            {
                new 
iSkin g_iPlayerSkin[id][CT];
                
cs_set_player_model(idg_CTSkin[iSkin][szCTSkin]);
            }
        }
    }

    return 
PLUGIN_CONTINUE;

it is a plugin problem or i have to update something on my server?

Last edited by lexzor; 08-10-2021 at 14:25.
lexzor is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 08-08-2021 , 20:21   Re: half-life model when using player model api.
Reply With Quote #2

Quote:
The problem started when i moved the server on another host (i didn't updated regamedll/rehlds just the amxx version because my mod have some problems.).
Not updating regamedll/rehlds MIGHT actually be your problem, I don't see any issue with the code?

Also POST FULL CODE.
__________________
deprale is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 08-08-2021 , 21:16   Re: half-life model when using player model api.
Reply With Quote #3

Full code has +1000 lines and i think it is not necessary to read all of it since i posted the problem code.

And on topic, i will update them and after i draw the conclusion that all is ok i will mark the topic as solved.

Last edited by lexzor; 08-08-2021 at 21:17.
lexzor is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 08-10-2021 , 14:25   Re: half-life model when using player model api.
Reply With Quote #4

problem solved after regamedll and rehlds update.
lexzor is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 08-10-2021 , 22:42   Re: half-life model when using player model api.
Reply With Quote #5

Quote:
Originally Posted by lexzor View Post
problem solved after regamedll and rehlds update.
Almost as if you didn't answer your own question while creating the topic...
Glad you resolved it though!
__________________
deprale 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 13:26.


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