Raised This Month: $ Target: $400
 0% 

Deathrun Manager by xPaw v3.0.3 [13/02/2010]


Post New Thread Reply   
 
Thread Tools Display Modes
Jameson
Junior Member
Join Date: Oct 2009
Old 11-01-2009 , 06:31   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #641

Hello everybody,
I need to make round-ending by the time (mp_roundtime) in the DeathRun Manager 3.0 plugin.
There is a non-stop round in all versions of this modification, so would anyone be so kind to try to do it ? =]
Jameson is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-01-2009 , 06:34   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #642

Learn to search, http://forums.alliedmods.net/showthread.php?p=494256
__________________
xPaw is offline
Jameson
Junior Member
Join Date: Oct 2009
Old 11-03-2009 , 02:04   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #643

ok, thank you
another question:
can it be 2 terrorists at the same time on the map?
I've tried to search it..
help please
Jameson is offline
Tox1c
New Member
Join Date: Nov 2009
Old 11-03-2009 , 09:17   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #644

Xpaw your map deathrun_temple is my favorite,the mod is good,i'm noob please tell me how to change the Fake Player,and the languene because wen i wan't to make somethink like to put my logo[T] it shows me-///DRM NOTFOUNT///SPRAY_LOGO ... Please help
Tox1c is offline
Regedents
Member
Join Date: Aug 2009
Old 11-07-2009 , 08:50   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #645

Is possible to set: All players have 2 lifes every round start and Admin have 4 life every round start???
Regedents is offline
Hammerfallerz
Senior Member
Join Date: Feb 2008
Old 11-13-2009 , 05:45   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #646

I have one plugin, which picks number of T's according to number of CT's. And I want to implement it into DRM, since it's not working correctly as a second plugin WITH deathrun manager.

Here's the code:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <fun>
#include <hamsandwich>

#define PLUGIN "CT and T ratio"
#define VERSION "0.1"
#define AUTHOR "ZssZ"

new const CsInternalModel:g_TModels[] = { CS_T_TERRORCS_T_LEETCS_T_ARCTICCS_T_GUERILLA }

new 
g_MaxClients
new dr_enableddr_tnum

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_cvar("dr_version"VERSIONFCVAR_SERVER)
    
set_cvar_string("dr_version"VERSION)
    
    
dr_enabled register_cvar("dr_enabled""1")
    
dr_tnum register_cvar("dr_tnum""8")
    
    
server_cmd("amx_lock T")
    
server_exec()
    
    
set_cvar_num("mp_limitteams"get_pcvar_num(dr_tnum))
    
set_cvar_num("mp_autoteambalance"0)
    
    
g_MaxClients get_maxplayers()
    
    
register_event("HLTV""new_round""a""1=0""2=0")
}

// On new round
public new_round()
{
set_task(0.1"port")
}

public 
port()
{
    
// Plugin disabled?
    
if (get_pcvar_num(dr_enabled) == 0)
        return;
    
    
// Get players count
    
new player_countplayerCsTeams:team
    
    
for (player 1player <= g_MaxClientsplayer++)
    {
        
// Check if user connected
        
if (!is_user_connected(player))
            continue;
        
        
// Get player team
        
team cs_get_user_team(player)
        
        
// Check if user not on a team yet
        
if (team == CS_TEAM_UNASSIGNED || team == CS_TEAM_SPECTATOR)
            continue;
        
        
// Switch to CT
        
cs_set_user_team(playerCS_TEAM_CT)
        
        
// Increase player count
        
player_count++
    }
    
    
// Do we have enough players?
    
if (player_count 1)
        return;
    
    
// Calculate how many Ts should we have
    
new num_ts player_count get_pcvar_num(dr_tnum)
    
    
// Make sure we have at least one
    
if (num_ts 1num_ts 1
    
    
// DEBUG
    
client_print(0print_chat"[Deathrun] %d Players Total - Randomly choosing %d Ts"player_countnum_ts)
    
    
// Now pick random Ts
    
new teamt
    
    
// Keep going through loop while we haven't gotten num_ts Ts
    
while (teamt num_ts)
    {
        
// Makes loop be able to work properly if player > g_MaxClients
        
if (player++ > g_MaxClientsplayer 1
        
        
// Check if user connected
        
if (!is_user_connected(player))
            continue;
        
        
// Only switch players from the CT team
        
if (cs_get_user_team(player) != CS_TEAM_CT)
            continue;
        
        
// Player has 1 in 10 chance of being selected as the T
        
if (random_num(1,10) == 1)
        {
            
cs_set_user_team(playerCS_TEAM_Tg_TModels[random_num(03)])
            
teamt++
        }
    }

So I've checked DRM code and found event where T is picked.
In default, it looks like this:
PHP Code:
public EventRandromize( ) {
    if( !
g_bEnabled || g_bFirstRound || g_bRandromized )
        return 
PLUGIN_CONTINUE;
    
    
g_bRandromized true;
    
    new 
iiPlayers32 ], iNumiPlayer;
    
get_playersiPlayersiNum"c" );
    
    if( 
iNum <= )
        return 
PLUGIN_CONTINUE;
    
    for( 
0iNumi++ ) {
        
iPlayer iPlayers];
        
        if( 
cs_get_user_teamiPlayer ) == CS_TEAM_T )
            
cs_set_user_teamiPlayerCS_TEAM_CT );
    }
    
    new 
iRandomPlayerCsTeams:iTeam;
    
    while( ( 
iRandomPlayer iPlayersrandom_num0iNum ) ] ) == g_iLastTerr ) { }
    
    
g_iLastTerr iRandomPlayer;
    
    
iTeam cs_get_user_teamiRandomPlayer );
    
    if( 
iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT ) {
        
cs_set_user_team(iRandomPlayerCS_TEAM_T);
        
        new 
szName32 ];
        
get_user_nameiRandomPlayerszName31 );
        
        for( 
0iNumi++ )
            
ColorChat(iPlayers], RED"%s^4 %L"g_szPrefixiPlayers], "DR_NOW_TERR"szName);
        
        if( !
g_bRestart && is_valid_entg_iThinker ) )
            
entity_set_floatg_iThinkerEV_FL_nextthinkget_gametime( ) + 15.0 );
    } else {
        
g_bRandromized false;
        
EventRandromize( );
    }
    
    return 
PLUGIN_CONTINUE;

So basically I want to pick T's in DRM just like that plugin is picking T's for a new round, so there would be 1 T for each X (in my case 9) CT's.
I did something like this (I'm not that deep into coding ):
PHP Code:
public EventRandromize( ) {   
    
// Get players count
    
new player_countplayerCsTeams:team;
    new const 
CsInternalModel:g_TModels[] = { CS_T_TERRORCS_T_LEETCS_T_ARCTICCS_T_GUERILLA };
    
    for (
player 1player <= g_iMaxplayersplayer++)
    {
        
// Check if user connected
        
if (!is_user_connected(player))
            continue;
        
        
// Get player team
        
team cs_get_user_team(player)
        
        
// Check if user not on a team yet
        
if (team == CS_TEAM_UNASSIGNED || team == CS_TEAM_SPECTATOR)
            continue;
        
        
// Switch to CT
        
cs_set_user_team(playerCS_TEAM_CT)
        
        
// Increase player count
        
player_count++
    }
    
    
// Do we have enough players?
    
if (player_count 1)
        return;
    
    
// Calculate how many Ts should we have
    
new num_ts player_count 9
    
    
// Make sure we have at least one
    
if (num_ts 1num_ts 1
    
    
// DEBUG
    
client_print(0print_chat"[Deathrun] %d Players Total - Randomly choosing %d Ts"player_countnum_ts)
    
    
// Now pick random Ts
    
new teamt
    
    
// Keep going through loop while we haven't gotten num_ts Ts
    
while (teamt num_ts)
    {
        
// Makes loop be able to work properly if player > g_MaxClients
        
if (player++ > g_iMaxplayersplayer 1
        
        
// Check if user connected
        
if (!is_user_connected(player))
            continue;
        
        
// Only switch players from the CT team
        
if (cs_get_user_team(player) != CS_TEAM_CT)
            continue;
        
        
// Player has 1 in 10 chance of being selected as the T
        
if (random_num(1,10) == 1)
        {
            
cs_set_user_team(playerCS_TEAM_Tg_TModels[random_num(03)])
            
teamt++
        }
    }

However, it results in:
Quote:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Expected token: ";", but found "if" on line 274
Error: Expected token: ";", but found "-identifier-" on line 281
Error: Expected token: ";", but found "}" on line 282
Error: Expected token: ";", but found "if" on line 292
Error: Expected token: ";", but found "-identifier-" on line 295
Error: Expected token: ";", but found "new" on line 298
Error: Expected token: ";", but found "while" on line 301
Error: Expected token: ";", but found "if" on line 307
Error: Expected token: ";", but found "-identifier-" on line 318
Error: Expected token: ";", but found "}" on line 319
Warning: Symbol is assigned a value that is never used: "g_bRandromized" on line 831
Warning: Symbol is never used: "g_iLastTerr" on line 831

10 Errors.
Can anyone please help me with this?
Again, I'm not that deep into coding to understand what the hell is wrong.
Hammerfallerz is offline
y52226382005
Junior Member
Join Date: Jul 2009
Old 11-13-2009 , 09:12   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #647

Why when i kill a terr,then the hud message say me have 2 lifes,but when i die,i can't respawn,can someone help me sorry for my bad eng.
y52226382005 is offline
sticksoldier
Junior Member
Join Date: Nov 2009
Location: Dubai!!
Old 11-15-2009 , 14:51   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #648

NICE PLUGINS
hey xpaw can we get any other weapon instead of USP like fiveseven, glock, p288 etc

Last edited by sticksoldier; 11-15-2009 at 15:27.
sticksoldier is offline
Old 11-15-2009, 14:54
sticksoldier
This message has been deleted by sticksoldier.
edga85
BANNED
Join Date: Jan 2009
Old 11-17-2009 , 14:12   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #649

xpaw you can update your mod by adding Deathrun ranks system
edga85 is offline
Send a message via Skype™ to edga85
decessed
Member
Join Date: Jun 2009
Location: Russia - United Kingdom
Old 11-25-2009 , 08:24   Re: Deathrun Manager by xPaw v3.0 [09/09/2009]
Reply With Quote #650

How to null completely all base with points? =)
decessed is offline
Send a message via Skype™ to decessed
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:16.


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