Raised This Month: $ Target: $400

[HELP] Playermodels TF2 Blu

Post New Thread Reply   
Thread Tools Display Modes
Author Message
New Member
Join Date: Jan 2021
Old 10-24-2023 , 20:17   [HELP] Playermodels TF2 Blu
Reply With Quote #1

hello, I need help with this problem and I have been trying to make the models of the blu team robots but of these models that are archived and are from the "Enhanced-est Bots" and I have tried to change the models (it is from stop that tank mode)

And I haven't been able to do it, can anyone help me?

Here's the code part of the model

bool g_bEnabled = true;

char g_strModelRobots[][] = {
    "",                               // Class 0 (Invalid)
    "models/bots_v2/player/scout.mdl", // Class 1 (Scout)
    "models/bots_v2/player/sniper.mdl", // Class 2 (Sniper)
    "models/bots_v2/player/soldier.mdl", // Class 3 (Soldier)
    "models/bots_v2/player/demo.mdl",   // Class 4 (Demoman)
    "models/bots_v2/player/medic.mdl",  // Class 5 (Medic)
    "models/bots_v2/player/heavy.mdl",  // Class 6 (Heavy)
    "models/bots_v2/player/pyro.mdl",   // Class 7 (Pyro)
    "models/bots_v2/player/spy.mdl",    // Class 8 (Spy)
    "models/bots_v2/player/engineer.mdl" // Class 9 (Engineer)
int g_iModelIndexRobots[sizeof(g_strModelRobots)];
char g_strModelHumans[][] =  {"", "models/player/scout.mdl", "models/player/sniper.mdl", "models/player/soldier.mdl", "models/player/demo.mdl", "models/player/medic.mdl", "models/player/heavy.mdl", "models/player/pyro.mdl", "models/player/spy.mdl", "models/player/engineer.mdl"};
int g_iModelIndexHumans[sizeof(g_strModelHumans)];

public void OnMapStart()

	// Precache robot models
	for(int i=0; i<sizeof(g_strModelRobots); i++) g_iModelIndexRobots[i] = Tank_PrecacheModel(g_strModelRobots[i]);
	// Precache human player model indices
	for(int i=0; i<sizeof(g_strModelHumans); i++) g_iModelIndexHumans[i] = Tank_PrecacheModel(g_strModelHumans[i]);

void Robot_Toggle(int client, bool bEnable)
		// Make the player into a robot
		AcceptEntityInput(client, "SetCustomModel");
		SetEntProp(client, Prop_Send, "m_bUseClassAnimations", 1);

		// Fix BLU spies appearing RED to teammates while disguised
		new team = GetClientTeam(client);
		if(g_nGameMode != GameMode_Race)
			if(team == TFTeam_Blue && TF2_GetPlayerClass(client) == TFClass_Spy)
				SetEntProp(client, Prop_Send, "m_bForcedSkin", true);
				SetEntProp(client, Prop_Send, "m_nForcedSkin", team-2);
				SetEntProp(client, Prop_Send, "m_bForcedSkin", false);
				SetEntProp(client, Prop_Send, "m_nForcedSkin", 0);		
			SetEntProp(client, Prop_Send, "m_bForcedSkin", false);
			SetEntProp(client, Prop_Send, "m_nForcedSkin", 0);	
		// Return the player back to normal
		AcceptEntityInput(client, "SetCustomModel");
		SetEntProp(client, Prop_Send, "m_bUseClassAnimations", 0);

		SetEntProp(client, Prop_Send, "m_bForcedSkin", false);
		SetEntProp(client, Prop_Send, "m_nForcedSkin", 0);
Attached Files
File Type: zip botsv2.zip (5.43 MB, 24 views)
Ko_Fi is offline

Thread Tools
Display Modes

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 15:08.

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