Raised This Month: $ Target: $400
 0% 

Random player/s.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
padilha007
Senior Member
Join Date: Jul 2008
Old 05-09-2009 , 12:35   Re: Random player/s.
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    
register_plugin("Random Player""0.1""padilha007")
    
register_logevent("random_player"2"1=Round_Start")
}

public 
random_player()
{
    new 
players[32], totalplayersrandplayer;
    
get_players(playerstotalplayers)

    if (!
randplayer)
        
randplayer random_num(1totalplayers)

    if(!
is_user_connected(randplayer) || !is_user_alive(randplayer))
    {
        
set_task(0.1"random_player")
        return 
PLUGIN_HANDLED
     
}


    
// You stuff with randplayer
    // index = randplayer

__________________

padilha007 is offline
 



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 23:09.


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