Raised This Month: $ Target: $400
 0% 

Random Player event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vtsoxluvr
Member
Join Date: Apr 2006
Old 04-15-2007 , 20:05   Random Player event
Reply With Quote #1

So i am trying to make an improved version of DoD Ninja for a server that i play on but the feature that they wanted the most i cant seem to get to work, i am trying to get it so that a ninja is chosen every like 35 seconds but i cant seem to get it to work, when i enable the random niinja mode at first it gives me an error: ninjamod.sma::random_event (line 245)
PHP Code:
public random_event(){
    
player_count get_playersnum();
    new 
maxpl get_maxplayers()
    new 
Player random_num(1maxpl)
    if (
player_count 1) {
        
//time_remaining = Float:get_systime()
        
random_event()
        return;
    }
    else if( 
player_count >= && is_user_connected(Player) == ){
**           
random_event()
        return 
PLUGIN_CONTINUE
    
}
    else if( 
player_count >= && is_user_connected(Player) == ){
        if ( 
g_status[Player] == true ){
            
random_event()
            return 
PLUGIN_CONTINUE
        
}
        else if( 
g_status[Player] == false ){
            
set_task(35.0"give_ninja"Player"b")
            
random_event()
            return 
PLUGIN_CONTINUE
        
}
    }

which is the line with the stars at the begining of it, then it assigns ninja nonstop for like 10 seconds, im not sure exactly why, if you need me to post all my code i will be happy to but ill warn you it isn't very clean

thanx for any help i receive
vtsoxluvr 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 06:40.


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