I no understand your fucking stupid ENGLISH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Please read TUTORIALS, C,C#,C++, you dont have PROGRAMM BASE!!!
Printable View
I no understand your fucking stupid ENGLISH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Please read TUTORIALS, C,C#,C++, you dont have PROGRAMM BASE!!!
if(current=="iwx_sprint_mp")
current=slot; // the slot from the sprint function
Sprint()
{
self endon("disconnect");
self notify("start_sprinting");
sprint_weap="iwx_sprint_mp";
slot="";
if(self getcurrentweapon()==self getweaponslotweapon("primary"))
slot="primary";
else
slot="primaryb";
self.sweapon=self getcurrentweapon();
if(self.sweapon==sprint_weap || self.sweapon=="none")
return;
Code:if(current=="iwx_sprint_mp")
current=Sprint();
Sprint()
{
self endon("disconnect");
self notify("start_sprinting");
sprint_weap="iwx_sprint_mp";
slot="";
if(self getcurrentweapon()==self getweaponslotweapon("primary"))
slot="primary";
else
slot="primaryb";
self.sweapon=self getcurrentweapon();
return slot;
}
Sprint()
{
self endon("disconnect");
self notify("start_sprinting");
sprint_weap="iwx_sprint_mp";
slot="";
if(self getcurrentweapon()==self getweaponslotweapon("primary"))
slot="primary";
else
slot="primaryb";
self.sweapon=self getcurrentweapon();
if(self.sweapon==sprint_weap || self.sweapon=="none")
return;
self.sammo1=self getWeaponSlotAmmo(slot);
self.sammo2=self getWeaponSlotClipAmmo(slot);
self.is_Sprinting = true;
self setWeaponSlotWeapon(slot, sprint_weap);
sprint_ammo = int( (self.sprint_stamina / level.sprint_time) * 100 );
self setWeaponSlotAmmo(slot, sprint_ammo);
self switchToWeapon(sprint_weap);
wait 0.25;
maxwidth = 100;
while ( isAlive(self) && self useButtonPressed() && self.sprint_stamina > 0 && self getcurrentweapon()==sprint_weap)
{
wait 0.1;
if(!isMoving(self))
break;
self.sprint_stamina -= 25;
if(self.sprint_stamina < 0)
self.sprint_stamina = 0;
sprint_ammo = int( (self.sprint_stamina / level.sprint_time) * 100 );
self setWeaponSlotAmmo(slot, sprint_ammo);
}
if ( isAlive(self) && self.sweapon!="none" && (self getcurrentweapon()==sprint_weap || self getcurrentweapon()=="none"))
{
self setWeaponSlotWeapon(slot,self.sweapon);
self setWeaponSlotAmmo(slot,self.sammo1);
self setWeaponSlotClipAmmo(slot,self.sammo2);
self switchToWeapon(self.sweapon);
self.is_Sprinting = false;
}
if ( isAlive(self) && self.sweapon!="none" && self getcurrentweapon()!=sprint_weap && self getcurrentweapon()!="none")
{
self setWeaponSlotWeapon(slot,self.sweapon);
self setWeaponSlotAmmo(slot,self.sammo1);
self setWeaponSlotClipAmmo(slot,self.sammo2);
self.is_Sprinting = false;
}
}
thats the sprint function
what's problems?
Stop posting code without code tags.
if(current=="iwx_sprint_mp")
current=slot;/// how to bring the slot value from inside the function sprint to add it to the dropwepon function
use continue;
inside the function to the following condition