View Single Post
SET_MODEL() thingy...
Old
  (#1)
Akz
Creator of GrogBot
 
Akz's Avatar
 
Status: Offline
Posts: 91
Join Date: Jan 2004
Default SET_MODEL() thingy... - 29-06-2004

Well... I have been making a little mod for some time to waste my time and to get some modding skills, and now I have ran into a problem:
In my mod, I'm using a some sort of a class system. Every class has a different model. In CBasePlayer::Spawn() I'm setting the model like this:
Code:
 	switch (player_class)
 	{
 		case CLASS_BADGUY1:
 			SET_MODEL(ENT(pev), "models/player/badguy1/badguy1.mdl");
 			g_ulModelIndexPlayer = pev->modelindex;
 			pev->sequence = LookupActivity( ACT_IDLE );
 			break;
 
 		case CLASS_BADGUY2:
 			SET_MODEL(ENT(pev), "models/player/badguy2/badguy2.mdl");
 			g_ulModelIndexPlayer = pev->modelindex;
 			pev->sequence = LookupActivity( ACT_IDLE );
 			break;
 	}
It works, but when I try to choose the team and class again (i.e. after restarting the map), it changes the team and class, but the model doesn't change. What's the problem?


GrogBot - A bot for Pirates, Vikings and Knights HL modification.

http://grogbot.bots-united.com
  
Reply With Quote