Now I'm trying to change their skins. I made a new player.mdl called player1.mdl. The new model has numerous skins.
Here's the code in PutClientInServer();
Code: Select all
setmodel (self, "progs/eyes.mdl");
modelindex_eyes = self.modelindex;
setmodel (self, "progs/player1.mdl");
modelindex_player = self.modelindex;
if (self.netname == "òåäòõí") // working, just not for bots
self.skin = 1;
if (self.netname == "Shadow")
self.skin = 2;
if (self.netname == "Godzilla")
self.skin = 3;
I've tried putting the code in other routines all over, but still it doesn't work.
Here's the code from bot_qw.qc:
Code: Select all
void() BotFrame =
{
local float num;
local string h;
h = infokey(world, "bot_options");
b_options = stof(h);
sv_maxspeed = cvar("sv_maxspeed"); // for the sake of speed
sv_gravity = cvar("sv_gravity");
sv_friction = cvar("sv_friction");
sv_accelerate = cvar("sv_accelerate");
sv_stopspeed = cvar("sv_stopspeed");
real_frametime = time - lasttime; // in QW frametime is fuxx0red
lasttime = time;
self = nextent(world);
num = 0;
while (num < max_clients)
{
if (self.ishuman == FALSE)
{
if (self.b_clientno > 0)
{
frik_obstacles();
CL_KeyMove();
SV_ClientThink();
SV_Physics_Client();
if (self.phys_obj)
{
if (self.phys_obj.modelindex != self.modelindex)
{
setmodel(self.phys_obj, "progs/player1.mdl");
self.phys_obj.modelindex = self.modelindex;
}
self.phys_obj.frame = self.frame;
self.phys_obj.angles = self.angles;
self.phys_obj.colormap = self.colormap;
self.phys_obj.effects = self.effects;
}
}
}
self = nextent(self);
num = num + 1;
}
};