PDA

View Full Version : Cod2 Gravitygun



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;
}
}

milepunta
22nd July 2017, 21:35
Try to increase ero=20; to higher number like 200 or 2000 :)

pekszon
26th July 2017, 20:43
not upping my character. Milepunta you test script and the good script send me

voron00
26th July 2017, 21:20
1352

IzNoGoD
26th July 2017, 23:19
https://killtube.org/showthread.php?1740-READ-BEFORE-POSTING-Guide-on-asking-for-help

And for the boneheaded types of people, here's the image from that thread:

571

You have 1) failed to properly, in correct english, describe your problem.
You have 2) not enabled developer (is my guess)
You have 3) used self, and not ensured that you are using it correctly. You have furthermore, not posted how you call your functions properly
You have 4) not tried any fixes. Furthermore, you have not added any debugging to your code
You have 5) skipped over steps 1 to 4 and posted on this forum.

Also, read this: https://killtube.org/showthread.php?1157-Scripting-FAQ-read-this-first!

It contains hungarian translations also, so you would be able to understand the stuff that's in there. You're basically being very annoying.

pekszon
27th July 2017, 21:19
ok. you no help. end topic.

IzNoGoD
28th July 2017, 12:06
ok. you no help. end topic.

It's not helping when you want


Milepunta you test script and the good script send me

That's called "doing it for you".