Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Problem with "if(getCvar" function

  1. #11
    Private
    Join Date
    May 2013
    Posts
    27
    Thanks
    0
    Thanked 19 Times in 11 Posts
    PHP Code:
    timepassed = (getTime() - level.starttime) / 1000;
    secondsleft int( (level.timelimit*60) - timepassed 0.5 ); 

  2. #12
    Private Invictus's Avatar
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    32
    Thanks
    25
    Thanked 13 Times in 6 Posts
    My code works, but when sounds plays to late, just add one second.

    PHP Code:
           passedtime = (getTime() - level.starttime) / 1000;
           
    secondsleft int((level.timelimit*60) - (passedtime));    
           
           if(
    secondsleft == 180)
           {

           
    ////your code

           

    Xfire : rozpierdalacz0

  3. #13
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    In my code I'm using a float variable, and you are using an integer, that's probably why.
    set logfile 2

Posting Permissions

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