|
Junior Member
Join Date: Sep 2009
Location: Kyrgyzstan
|
09-20-2010
, 12:49
Re: Deathrun Manager by xPaw v3.0.3 [13/02/2010]
|
#927
|
Quote:
Originally Posted by RedFaction
Hi everyone, how to make that life is not wasted automatically, but in order to resurrect writing / respawn
[ru]Всем привет, как сделать чтобы жизнь не тратилась автоматически, а чтоб воскрешаться написав /respawn
|
в код вместо этого
PHP Code:
public EventDeath( ) { if( !g_bEnabled ) return PLUGIN_CONTINUE; #if defined FAKE_PLAYER new iVictim = read_data( 2 ); new iTeam = get_user_team( iVictim ); if( iTeam == 1 && is_user_alive( g_iFakeplayer ) ) fakedamage( g_iFakeplayer, "worldspawn", 100.0, DMG_GENERIC ); if( !get_pcvar_num( g_pLifeSystem ) ) return PLUGIN_CONTINUE; #else if( !get_pcvar_num( g_pLifeSystem ) ) return PLUGIN_CONTINUE; new iVictim = read_data( 2 ); new iTeam = get_user_team( iVictim ); #endif new iKiller = read_data( 1 ); if( iKiller != iVictim && get_user_team(iKiller) != iTeam ) g_Lifes[iKiller]++; if( cs_get_user_team( iVictim ) == CS_TEAM_CT && g_Lifes[ iVictim ] > 0 ) { new iCTcount; for( new i = 1; i <= g_iMaxplayers; i++ ) { if( is_user_alive( i ) && cs_get_user_team( i ) == CS_TEAM_CT ) iCTcount++; } if( iCTcount > 1 ) { set_task(3.2, "fnRevivePlayer", iVictim); ColorChat( iVictim, RED, "%s^1 %L", g_szPrefix, iVictim, "DR_LIFE_RESPAWN" ); } /*else ColorChat( iVictim, RED, "%s^1 %L", g_szPrefix, iVictim, "DR_LIFE_CANT" );*/ } return PLUGIN_CONTINUE; }
public fnRevivePlayer( id ) { if( g_bConnected[ id ] ) { if( cs_get_user_team( id ) == CS_TEAM_CT ) { new iCTcount; for( new i = 1; i <= g_iMaxplayers; i++ ) if( is_user_alive( i ) && cs_get_user_team( i ) == CS_TEAM_CT ) iCTcount++; if( iCTcount > 1 ) { ExecuteHamB( Ham_CS_RoundRespawn, id ); g_Lifes[ id ]--; } } } }
надо добавить это
PHP Code:
register_clcmd("say /respawn", "fnRevivePlayer")
+
PHP Code:
public EventDeath( ) { if( !g_bEnabled ) return PLUGIN_CONTINUE; #if defined FAKE_PLAYER new iVictim = read_data( 2 ); new iTeam = get_user_team( iVictim ); if( iTeam == 1 && is_user_alive( g_iFakeplayer ) ) fakedamage( g_iFakeplayer, "worldspawn", 100.0, DMG_GENERIC ); if( !get_pcvar_num( g_pLifeSystem ) ) return PLUGIN_CONTINUE; #else if( !get_pcvar_num( g_pLifeSystem ) ) return PLUGIN_CONTINUE; new iVictim = read_data( 2 ); new iTeam = get_user_team( iVictim ); #endif new iKiller = read_data( 1 ); if( iKiller != iVictim && get_user_team(iKiller) != iTeam ) g_Lifes[iKiller]++; return PLUGIN_CONTINUE; }
public fnRevivePlayer( id ) { if( g_bConnected[ id ] ) { if( cs_get_user_team( id ) == CS_TEAM_CT && g_Lifes[ id ] > 0 ) { new iCTcount; for( new i = 1; i <= g_iMaxplayers; i++ ) if( is_user_alive( i ) && cs_get_user_team( i ) == CS_TEAM_CT ) iCTcount++; if( iCTcount > 1 ) { ColorChat( id, RED, "%s^1 %L", g_szPrefix, id, "DR_LIFE_RESPAWN" ); ExecuteHamB( Ham_CS_RoundRespawn, id ); g_Lifes[ id ]--; } /*else { ColorChat( iVictim, RED, "%s^1 %L", g_szPrefix, iVictim, "DR_LIFE_CANT" ); }*/ } } }
__________________
Last edited by Gfx; 09-20-2010 at 12:56.
|
|
|
|