02-16-2013, 12:53
Can someone help me ?
Code:
Health(Camera)
{
while(1)
{
Camera waittill("damage", eInflictor, attacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime);
attacker thread maps\mp\gametypes\_damagefeedback::updateDamageFeedback(sHitLoc);
Camera.health -= iDamage;
if(Camera.health <= 0)
{
Camera delete();
self notify( "camdeath" );
}
wait 0.05;
}
}
CameraView(Camera)
{
self endon("camdeath");
while(1)
{
self notifyOnPlayerCommand("N", "+actionslot 1");
self waittill("N");
self.switchto = self getcurrentweapon();
laptop = "killstreak_ac130_mp";
self giveWeapon(laptop,0,false);
self switchToWeapon(laptop);
self ThermalVisionFOFOverlayOn();
self CameraLinkTo(Camera,"tag_origin");
self notifyOnPlayerCommand("N", "+actionslot 1");
self waittill("N");
self takeWeapon(laptop);
self switchToWeapon(self.switchto);
self ThermalVisionFOFOverlayOff();
self CameraUnlink();
}
Camera()
{
self notifyOnPlayerCommand("N", "+actionslot 1");
self waittill("N");
Camera = spawn("script_model", self.origin);
Camera setModel("c130_zoomrig");
Camera.angles = self.angles;
Camera Solid();
Camera EnableLinkTo();
Camera.team = self.team;
Camera.owner = self;
Camera setCanDamage(true);
Camera.health = 500;
Camera.maxhealth = 500;
Camera thread Health(Camera);
while(1)
{
self thread CameraView(Camera);
}
}