Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: how to call a value from another function?

  1. #21
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    I no understand your fucking stupid ENGLISH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Please read TUTORIALS, C,C#,C++, you dont have PROGRAMM BASE!!!
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  2. The Following User Says Thank You to maxdamage99 For This Useful Post:

    Paho (23rd July 2016)

  3. #22
    Private
    Join Date
    Jul 2016
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post
    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;

  4. #23
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by IzNoGoD View Post
    i still have no idea what you're trying to do. Explain better.

    Use code tags.

    Learn how to report on forums

    Learn some english.

    Still valid reply.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #24
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    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;
    }

  6. The Following User Says Thank You to Paho For This Useful Post:

    maxdamage99 (23rd July 2016)

  7. #25
    Private
    Join Date
    Jul 2016
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post
    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;
    }
    }
    Last edited by xulikav; 23rd July 2016 at 15:57.

  8. #26
    Private
    Join Date
    Jul 2016
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post
    thats the sprint function

  9. #27
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    what's problems?

  10. #28
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Stop posting code without code tags.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  11. #29
    Private
    Join Date
    Jul 2016
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post
    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

  12. #30
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    use continue;
    inside the function to the following condition

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •