Raised This Month: $ Target: $400
 0% 

[HELP] Get player/bot id and randomize?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hartmann
Senior Member
Join Date: Nov 2014
Old 09-27-2015 , 11:19   Re: [HELP] Get player/bot id and randomize?
Reply With Quote #2

Try, if that is what you want:

PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>

new weapons_test[][] = {
    
"weapon_m4a1",
    
"weapon_ak47",
    
"weapon_sg552"
}

public 
plugin_init() {
    
    
register_logevent("logevent_round_start"2"1=Round_Start"
}
public 
logevent_round_start() {
    new 
players[32], iPnumsName[32];
    new 
player;
    
get_players(playersiPnum"a");
        if(
iPnum)
        
player players[random(iPnum)];
    if(
is_user_alive(player)){
        
get_user_name(playersName31);
        
client_print(0print_chat"Random player will be %s."sName);
        new 
size_weapons random(sizeof weapons_test);
        
give_item(playerweapons_test[size_weapons]);
    }

__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx

Hartmann 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 22:04.


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