Raised This Month: $ Target: $400
 0% 

How can I do only 1 Terrorist?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MihaiGamerXD
Member
Join Date: Aug 2018
Old 11-27-2018 , 03:31   How can I do only 1 Terrorist?
Reply With Quote #1

Hello again. I want to know how can I do just one terrorist? Example, when the random player has been choosed, the other players except the random player will change the team to CT, like on ZP.

I tried this code:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

public plugin_init() {
    
register_plugin("Red's War Zombie Mode""1.0""MihaiGamerXD")
    
register_event("HLTV","onNewRound","a","1=0","2=0")
}

public 
onNewRound() {
    
set_task(1.0,"ZombieTime",0,"",0,"a",1)
}

public 
ZombieTime() {
    new 
iPlayers[32], iNum
    get_players
(iPlayers,iNum,"a")
    for (new 
0iNumi++) {
        new 
target iPlayers[random(i)]
        if (
is_user_alive(iPlayers[i])) {
            if (
iPlayers[i] != target) {
                
cs_set_user_team(iPlayers[i],CS_TEAM_CT)
            }
        }
    }

And it doesn't work! Any ideas?
MihaiGamerXD 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 07:40.


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