Results 1 to 10 of 13

Thread: Problem with "if(getCvar" function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by YuriJurek View Post
    As well you could try setting a new variable instead of cvar like
    PHP Code:
    fun_bashtime 1;

    // and then

        
    if(fun_bashtime == 1)
        { 
            
    self setWeaponSlotAmmo("primaryb"0);
            
    self setWeaponSlotClipAmmo("primaryb"0);
        }
        else
        {
            
    self giveMaxAmmo(self.pers["weapon"]);
        } 
    Anyway for my own info, is there any advantage of setting a cvar over variables?

    Probably due to the fact you can rcon-change it.

    Also, your code uses local vars, which is not the most useful thing to do...

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

    YuriJurek (28th December 2013)

Posting Permissions

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