pekszon
22nd July 2017, 14:56
Hello! Not up my character. Help please
main()
{
thread pickup();
}
pickup()
{
self endon("disconnect");
self endon("killed_player");
self endon("spawned_player");
oldorg=self.origin;
pickup=0;
elet=200;
dobas=100;
ero=20;
varakozas=0;
for(;;)
{
if(!self isonground())
{
if(self attackbuttonpressed() && self.pers["weapon"] == "an_94_silencer_mp")
{
if(dobas>0)
{
ero=20;
if(oldorg==self.origin)
vDir=(0,0,1);
else
{
vDir=vectornormalize(self.origin-oldorg);
vDir=vectornormalize((vDir[0],vDir[1],10));
}
trace=bullettrace(self.origin,self.origin-(0,0,elet),false,undefined);
damage=int(ero-(ero*trace["fraction"]));
self.health+=damage;
self finishPlayerDamage(self,self,damage,0,"MOD_UNKNOWN","panzerschreck_mp",self.origin,vDir,"none",0);
varakozas=0;
pickup=1;
dobas--;
}
else if(pickup==1 && dobas==0)
{
varakozas++;
dobas++;
ero++;
}
}
}
oldorg=self.origin;
wait 0.05;
}
}
main()
{
thread pickup();
}
pickup()
{
self endon("disconnect");
self endon("killed_player");
self endon("spawned_player");
oldorg=self.origin;
pickup=0;
elet=200;
dobas=100;
ero=20;
varakozas=0;
for(;;)
{
if(!self isonground())
{
if(self attackbuttonpressed() && self.pers["weapon"] == "an_94_silencer_mp")
{
if(dobas>0)
{
ero=20;
if(oldorg==self.origin)
vDir=(0,0,1);
else
{
vDir=vectornormalize(self.origin-oldorg);
vDir=vectornormalize((vDir[0],vDir[1],10));
}
trace=bullettrace(self.origin,self.origin-(0,0,elet),false,undefined);
damage=int(ero-(ero*trace["fraction"]));
self.health+=damage;
self finishPlayerDamage(self,self,damage,0,"MOD_UNKNOWN","panzerschreck_mp",self.origin,vDir,"none",0);
varakozas=0;
pickup=1;
dobas--;
}
else if(pickup==1 && dobas==0)
{
varakozas++;
dobas++;
ero++;
}
}
}
oldorg=self.origin;
wait 0.05;
}
}