03-03-2014, 14:20
Hello.
what is the problem with my code pls
[/quote]
what is the problem with my code pls
Code:
SexDoll()
{
self endon("death");
for(;;)
{
self waittill ( "weapon_fired" );
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
if(self.pickedbullet == 0)
{
sentry = spawn("script_model", SPLOSIONlocation+( 0,0, 0));
self setModel( "furniture_blowupdoll01" );
self iPrintlnBold(SPLOSIONlocation);
}
}
}
spawnSM(origin, model, angles)
{
ent = spawn("script_model", origin);
ent setModel(model);
ent Solid();
ent CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
if(isDefined(angles))
ent.angles = angles;
return ent;
}