AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set random T > ct (https://forums.alliedmods.net/showthread.php?t=106269)

One 10-13-2009 07:20

set random T > ct
 
tittle :P

SnoW 10-13-2009 07:32

Re: set random T > ct
 
Quote:

Originally Posted by One (Post 960656)
tittle :P

But the title isn't understandable.

ot_207 10-13-2009 07:34

Re: set random T > ct
 
And you also double posted..

xPaw 10-13-2009 07:34

Re: set random T > ct
 
Check how deathrun manager works.

One 10-13-2009 07:47

Re: set random T > ct
 
Quote:

Originally Posted by SnoW (Post 960658)
But the title isn't understandable.

the tittle is understandable. set random T to CT? idk what you can't understand.
Quote:

Originally Posted by ot_207 (Post 960660)
And you also double posted..

sry server error :)
Quote:

Originally Posted by xPaw (Post 960661)
Check how deathrun manager works.

ty xpaw.

SnoW 10-13-2009 08:06

Re: set random T > ct
 
Quote:

Originally Posted by One (Post 960666)
the tittle is understandable. set random T to CT? idk what you can't understand.

For me it means that random Terrorist team is bigger than Counter-terrorist team. Which indicates to a value how many players are in each team.

One 10-13-2009 08:16

Re: set random T > ct
 
i need to know how to catch random player.

i'll do it after 5 users are on the server.
if(get_max_players() >= 5)
cs_set_user_team(randomt,cs_team_t)

somthing like this.xpaw's code is realy easy. i think i can do it :P

vitorrd 10-13-2009 10:54

Re: set random T > ct
 
Quote:

Originally Posted by SnoW (Post 960675)
For me it means that random Terrorist team is bigger than Counter-terrorist team. Which indicates to a value how many players are in each team.

Thought the same.

@One: get_players(players, num) new randomPlayer = players[random(num)]

By the way, it's get_maxplayers(), not get_max_players().

One 10-13-2009 11:34

Re: set random T > ct
 
Quote:

Originally Posted by vitorrd (Post 960756)
Thought the same.

@One: get_players(players, num) new randomPlayer = players[random(num)]

By the way, it's get_maxplayers(), not get_max_players().

ty, i was @ work & just writed anything :P

:(
huh ?

PHP Code:

/********************************************************************************************
*********************************** Versteck dich *******************************************
*********************************************************************************************






*********************************************************************************************/
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

new g_MaxPlayers
new g_start_mod
new g_first_round
new g_alive_users
new iRandomPlayerCsTeams:iTeam
new iPlayers32 ],iNum,iPlayer

public plugin_init() 
{
    
register_plugin("Versteck dich""1.0""Dr.One")
    
register_logevent("EventRoundStart"2"1=Round_Start");
    
g_MaxPlayers get_maxplayers()
}
public 
EventRoundStart()
{
    
    while( ( 
iRandomPlayer iPlayersrandom_num0iNum ) ] ) == iRandomPlayer ) { }

    for( new 
0<=  g_MaxPlayersi++)
    {
        if(
is_user_alive(i))
        {
            
g_alive_users++
        }
    }
    if(
g_alive_users >= 3)
    {
        
start_game()
        
g_first_round 1
    
}
}
public 
start_game()
{
    if(
g_first_round == && g_alive_users >= && g_alive_users <= 10)
    {
        
cs_set_user_team(iRandomPlayerCS_TEAM_T);
    }


is this ok so ?

xPaw 10-13-2009 11:51

Re: set random T > ct
 
rofl.


All times are GMT -4. The time now is 22:42.

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