Results 1 to 10 of 13

Thread: Problem with "if(getCvar" function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 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?
    Anyway for my own info, is there any advantage of setting a cvar over variables?
    The advantages of using variables instead of seeking the value of a cvar come into its own when seeking the value for a client/player, as you cannot get the value of a cvar for a client/player without using a menu. Hence, getting a client/player variable is the done thing. I typically turn all cvars into variables and seek the value of variables habitually as it is more sure-fire.

  2. The Following User Says Thank You to Tally 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
  •