it's me again!
Currently working on a fun race that let's you play as the Master Chief from Halo! I even got models for his pistol, his assault rifle & his Energy Sword. But that's not the issue.
What's really.. well, bothering me is the following. Take a look at the code.
Code:
public OnWar3EventSpawn(client)
{
new race=War3_GetRace(client);
if( race == thisRaceID)
{
if(ValidPlayer(client, true))
{
new team = GetClientTeam(client);
GivePlayerItem(client,"weapon_deagle");
GivePlayerItem(client,"weapon_p90");
GivePlayerItem(client,"weapon_knife");
if( team == 3)
{
SetEntityModel(client, "models/player/bic/ct_sas.mdl");
}
else if( team == 2)
{
SetEntityModel(client, "models/player/bic/t_arctic.mdl");
}
}
}
}
{
new race=War3_GetRace(client);
if( race == thisRaceID)
{
if(ValidPlayer(client, true))
{
new team = GetClientTeam(client);
GivePlayerItem(client,"weapon_deagle");
GivePlayerItem(client,"weapon_p90");
GivePlayerItem(client,"weapon_knife");
if( team == 3)
{
SetEntityModel(client, "models/player/bic/ct_sas.mdl");
}
else if( team == 2)
{
SetEntityModel(client, "models/player/bic/t_arctic.mdl");
}
}
}
}
The weird thing is, both ARE working models. Completely.
However, it SETS the models for terrorist. It doesn't do it for the counter-terrorist, though. Both models have been tested.
I once reverse the models (gave the CT the red one and the T the blue one) - the Terrorist was a blue chief. The CT still did not have any model.
Now, I've been searching through some races, including a lot of TCs work, as he uses a LOT of models, and I compared them to mine.
I still couldn't find the error.
I was under the impression that GetClientTeam(client) is T if it returns 2, CT if it returns 3, Spectator if it returns 1.
I'd greatly appreciate your help.
I'd love to release this Master chief once I'm done with it. (Finding the models for the guns took me quite some time, some luck and an open svn ;d; also, I'll try to implement the Shield (got the sounds) that automatically recharges if the client is not taking damage.)
Once again, I thank you in advance,
Vulpone






Logged



