Raised This Month: $ Target: $400
 0% 

Choose random player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-03-2012 , 13:29   Re: Choose random player
Reply With Quote #1

You don't need 2 variables if you only use the indexes for this.

PHP Code:
new players[32], countrandomplayer
 
get_players
(players,count,"ae","TERRORIST")
randomplayer players[random(count)]
set_user_health(randomplayer,300)
// if you need the random T index after this code, then you should make 2 variables, because we are getting the CT index in the same variable.......
 
get_players(players,count,"ae","CT")
randomplayer players[random(count)]
set_user_health(randomplayer,300)
 
ColorChat(idGREEN"[%s] Objective:^1 Kill the opposite VIP!"szPrefix)
ColorChat(idGREEN"[%s]^1 The current round is:^4 Kill the VIP!"szPrefix
Also, you need the "e" flag for the specific team in get_players.
__________________

Last edited by <VeCo>; 05-03-2012 at 13:30.
<VeCo> is offline
Reply



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:19.


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