Raised This Month: $ Target: $400
 0% 

Get 1 Alive Random To CT , and Set all other players to Terro


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 10-02-2017 , 12:17   Get 1 Alive Random To CT , and Set all other players to Terro
Reply With Quote #1

Hello , i need like this
public sniper(id)
{
Get 1 Random Player and set him to CT , and set all other players to Terro team
}
Azeddine is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 10-02-2017 , 12:56   Re: Get 1 Alive Random To CT , and Set all other players to Terro
Reply With Quote #2

PHP Code:
public sniper(id) {
    new 
players[32], numpid
    
    
if(get_user_team(id) != 2)
        
cs_set_user_team(id2)
        
    
get_players(playersnum"h")
    for(new 
ii<numi++) {
        
pid players[i]
        if(
get_user_team(pid) != 1)
            
cs_set_user_team(pid1)
    }

__________________
retired chump

Last edited by DjSoftero; 10-02-2017 at 12:57. Reason: forgot php tag
DjSoftero is offline
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 10-02-2017 , 12:59   Re: Get 1 Alive Random To CT , and Set all other players to Terro
Reply With Quote #3

Thanks i will test it soon , i need to give 5000 HP to TERRO and give 250 HP to CT
Azeddine is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 10-02-2017 , 13:25   Re: Get 1 Alive Random To CT , and Set all other players to Terro
Reply With Quote #4

then add (set_user_health(id, amount) to the function.
__________________
retired chump
DjSoftero 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 04:03.


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