Raised This Month: $ Target: $400
 0% 

Timer bugged.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-13-2012 , 16:47   Timer bugged.
Reply With Quote #1

Hello there,

My timer is bugged, possibly because im using a loop that when the timer hits 0 that everyone opens the menu. Now for example 2 players are connected to my server its going from 15 to 13 to 11 so on but when im alone its going 15 14 13 so on. heres my little code

PHP Code:
public KickMenu3(id)
{    
    
// timer
    
Timer 15
    
    
// sound
    
client_cmd(0"spk misc/bilalvote.wav")
    
    
// menu
    
KickMenu4(id)
    
KickMenu6(id)
    
    return 
PLUGIN_CONTINUE
}

public 
KickMenu4(id)
{
    if(
task_exists(TASKID))
        
remove_task(TASKID)
    
    
set_task(1.0"KickMenu5"TASKID__"a"Timer)
}

public 
KickMenu5(id)
{
    new 
players[32], iNum
    get_players
(playersiNum"ch")
    
    for (new 
i<iNumi++)
    {
        if (
Timer == 0
        {
            
EndVote(players[i])
        }
        else 
        {
            
KickMenu6(players[i])
        }
    }
    return 
PLUGIN_CONTINUE

By the way if im trying to use for example: KickMenu6(id), i will get a server crash. Thats why i used a loop!
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode