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

Problem while changing the player model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MihaiGamerXD
Member
Join Date: Aug 2018
Old 01-15-2020 , 03:36   Problem while changing the player model
Reply With Quote #1

I got a serious problem, and I can't fix it. When I try to change the player model, it doesn't work correctly. I tried thousand of ideas, but it does not change the model correctly. What's wrong?
Code:
public plugin_init()
{
        set_task(0.1,"RW_M",0,"",0,"b")
}

public RW_M() {
	new iPlayers[32], iNum, iPlayer, playername[64];
	get_players(iPlayers,iNum,"a")
	for (new i = 0; i < iNum; i++) {
		iPlayer = iPlayers[i]
		if (is_user_alive(iPlayer)) {
			get_user_name(iPlayer,playername,63)
			server_print("%s: %i",playername,cs_get_user_team(iPlayer));
			new mapname[32]
			get_mapname(mapname,31)
			if (equal(mapname,"redswar_zm")) {
				if (cs_get_user_team(iPlayer) == CS_TEAM_CT) {
					cs_set_user_model( iPlayer, "redswar_bird" )
				}
				else if (cs_get_user_team(iPlayer) == CS_TEAM_T) {
					cs_set_user_model( iPlayer, "redswar_zombie" )
				}
			}
			else {
				if (cs_get_user_team(iPlayer) == CS_TEAM_CT) {
					if (cs_get_user_vip(iPlayer)) {
						cs_set_user_model( iPlayer, "redswar_vip" )
					}
					else {
						cs_set_user_model( iPlayer, "redswar_bird" )
					}
				}
				else if (cs_get_user_team(iPlayer) == CS_TEAM_T) {
					cs_set_user_model( iPlayer, "redswar_pig" )
				}
			}
		}
	}
}
And I also installed Amx Mod X 1.8.3 (cuz 1.8.2 has Respawn issues, which also doesn't work correctly, but with this version works perfectly now), I'm also testing with bots.
I tried updating HLDS, but still doesn't change the model, same when testing in listen server...
Maybe this happens on Steam version? If so, should I try in Non-Steam version? Cuz as I know it worked perfectly in Non-Steam version, I can't remember exactly...

Last edited by MihaiGamerXD; 01-15-2020 at 03:39.
MihaiGamerXD is offline
 



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 03:07.


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