hello everyone,
i have a problem with these two codes, there arent bad syntax in it but they doesnt work and idk why.. i hope someone can help me out
thanks in advance.
//slide code
initslide()
{
self thread processslide();
}
processslide()
{
self endon("slide_restore");
slidepos = self.origin;
slidee = spawn("script_model", self.origin + (0, 0, 10));
slidee setmodel("t6_wpn_supply_drop_ally");
slidee.angles = self.angles + (30, 0, 90);
while (self meleebuttonpressed() && distance(self.origin, slidee.origin) <= 100)
{
self.originobj = spawn("script_origin", self.origin, 1);
self.originobj.angles = self.angles;
self playerlinkto(self.originobj, undefined);
wait 0.1;
sweapon = self getcurrentweapon();
normalized = anglesToForward(self getplayerangles());
scaled = vectorScale(normalized, 200);
originpos = self.origin + scaled;
self.originobj.origin = originpos;
self unlink();
i = 0;
while (i < 10)
{
self setvelocity(self getvelocity() + (0, 0, 340));
wait 0.05;
i++;
}
}
wait 0.05;
wait 0.05;
}
// carepackagestall code
carepackagestall()
{
stallpos = self.origin;
stall = spawn("script_model", self.origin + (0, 0, 10));
stall setmodel("t6_wpn_supply_drop_ally");
stall.angles = (0, 0, 0);
if(self usebuttonpressed() && distance(self.origin, stall.origin) <= 100)
{
self.stallin = spawn("script_model", self.origin);
self playerlinkto(self.stallin);
self iprintlnbold("capturing...");
self disableweapons();
}
else
{
if (distance(self.origin, stall.origin) <= 100 && self.menustate == 0)
{
self unlink();
self enableweapons();
}
}
wait 0.001;
wait 0.001;
}
i have a problem with these two codes, there arent bad syntax in it but they doesnt work and idk why.. i hope someone can help me out
thanks in advance.
//slide code
initslide()
{
self thread processslide();
}
processslide()
{
self endon("slide_restore");
slidepos = self.origin;
slidee = spawn("script_model", self.origin + (0, 0, 10));
slidee setmodel("t6_wpn_supply_drop_ally");
slidee.angles = self.angles + (30, 0, 90);
while (self meleebuttonpressed() && distance(self.origin, slidee.origin) <= 100)
{
self.originobj = spawn("script_origin", self.origin, 1);
self.originobj.angles = self.angles;
self playerlinkto(self.originobj, undefined);
wait 0.1;
sweapon = self getcurrentweapon();
normalized = anglesToForward(self getplayerangles());
scaled = vectorScale(normalized, 200);
originpos = self.origin + scaled;
self.originobj.origin = originpos;
self unlink();
i = 0;
while (i < 10)
{
self setvelocity(self getvelocity() + (0, 0, 340));
wait 0.05;
i++;
}
}
wait 0.05;
wait 0.05;
}
// carepackagestall code
carepackagestall()
{
stallpos = self.origin;
stall = spawn("script_model", self.origin + (0, 0, 10));
stall setmodel("t6_wpn_supply_drop_ally");
stall.angles = (0, 0, 0);
if(self usebuttonpressed() && distance(self.origin, stall.origin) <= 100)
{
self.stallin = spawn("script_model", self.origin);
self playerlinkto(self.stallin);
self iprintlnbold("capturing...");
self disableweapons();
}
else
{
if (distance(self.origin, stall.origin) <= 100 && self.menustate == 0)
{
self unlink();
self enableweapons();
}
}
wait 0.001;
wait 0.001;
}