PHP Code:
/* Plugine Eklenen Yeni Özellikler
*
* v1.1 = Havayı Karartma.
* v1.2 = Alışveriş Engel.
* v1.3 = C4 Yerleştirme Engel.
* v1.4 = NightCrawler'lar Yere Düşen Silahları Alamaz.
* v1.5 = Sağlık 25'in Altına Düşünce Ses ve Görüntü Efekti + Ses Eklendi.
* v1.6 = Humanlar NightCrawler'ları Öldürdüğünde HE Gelmesi Eklendi.
* v1.7 = Atılan HE Humanlara Zarar Vermemesi Eklendi.
* v1.8 = Kan Efektini Kaldırma Eklendi.
* v1.9 = NightCrawler'ların Ölüm Mesajlarını Gizleme Eklendi.
*/
#pragma semicolon 1
#pragma tabsize 4
#pragma ctrlchar '\'
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <fakemeta>
#include <fakemeta_stocks>
#include <engine>
#include <colorchat>
#define PISTOL_WEAPONS_BIT (1<<CSW_GLOCK18|1<<CSW_USP|1<<CSW_DEAGLE|1<<CSW_P228|1<<CSW_FIVESEVEN|1<<CSW_ELITE)
#define SHOTGUN_WEAPONS_BIT (1<<CSW_M3|1<<CSW_XM1014)
#define SUBMACHINE_WEAPONS_BIT (1<<CSW_TMP|1<<CSW_MAC10|1<<CSW_MP5NAVY|1<<CSW_UMP45|1<<CSW_P90)
#define RIFLE_WEAPONS_BIT (1<<CSW_FAMAS|1<<CSW_GALIL|1<<CSW_AK47|1<<CSW_SCOUT|1<<CSW_M4A1|1<<CSW_SG550|1<<CSW_SG552|1<<CSW_AUG|1<<CSW_AWP|1<<CSW_G3SG1)
#define MACHINE_WEAPONS_BIT (1<<CSW_M249)
#define PRIMARY_WEAPONS_BIT (SHOTGUN_WEAPONS_BIT|SUBMACHINE_WEAPONS_BIT|RIFLE_WEAPONS_BIT|MACHINE_WEAPONS_BIT)
#define SECONDARY_WEAPONS_BIT (PISTOL_WEAPONS_BIT)
#define IsPrimaryWeapon(%1) ( (1<<%1) & PRIMARY_WEAPONS_BIT )
#define IsSecondaryWeapon(%1) ( (1<<%1) & PISTOL_WEAPONS_BIT )
#define m_iVGUI 510
#define m_fGameHUDInitialized 349
#define m_fNextHudTextArgsGameTime 198
#define TEAM_MENU "#Team_Select"
#define TEAM_MENU2 "#Team_Select_Spect"
#define MIN_WEAPON CSW_P228
#define MAX_WEAPON CSW_P90
#define TEAM_NC CS_TEAM_T
#define TEAM_HUMAN CS_TEAM_CT
#define CLASS_WEATHER_EFFECTS "weather_effects"
#define ZOMBIE_THUNDER_1 "ambience/thunder_clap.wav"
#define ZOMBIE_THUNDER_2 "de_torn/torn_thndrstrike.wav"
#define MAX_LIGHT_POINTS 4
#define FFADE_IN 0x0000
#define FFADE_OUT 0x0001
#define FFADE_MODULATE 0x0002
#define FFADE_STAYOUT 0x0004
#define DMG_HEGRENADE (1<<24)
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )
const Float:g_fHiz = 999.0;
enum (+=1000)
{
TASK_ADRENALINE = 1000,
TASK_SUICIDE,
TASK_POISON,
TASK_INVISIBLE
}
enum {
Kirmizi,
Yesil,
Mavi
};
new const g_iMaxBPAmmo[ MAX_WEAPON + 1 ] =
{
0, 52, 0, 90, 1, 32, 0, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120, 30,
120, 200, 32, 90, 120, 90, 2, 35, 90, 90, 0, 100
};
new const g_iMaxClipAmmo[ MAX_WEAPON + 1 ] =
{
0, 13, 0, 10, 0, 7, 0, 30, 30, 0, 30, 20, 25, 30, 35, 25, 12, 20, 10, 30,
100, 8, 30, 30, 20, 0, 7, 30, 30, 0, 50
};
new const g_szWeaponClassnames[ MAX_WEAPON + 1 ][ ] =
{
"", "weapon_p228", "", "weapon_scout", "weapon_hegrenade",
"weapon_xm1014", "weapon_c4", "weapon_mac10", "weapon_aug",
"weapon_smokegrenade", "weapon_elite", "weapon_fiveseven",
"weapon_ump45", "weapon_sg550", "weapon_galil", "weapon_famas",
"weapon_usp", "weapon_glock18", "weapon_awp", "weapon_mp5navy",
"weapon_m249", "weapon_m3", "weapon_m4a1", "weapon_tmp", "weapon_g3sg1",
"weapon_flashbang", "weapon_deagle", "weapon_sg552", "weapon_ak47",
"weapon_knife", "weapon_p90"
};
new const g_szWeaponNames[ MAX_WEAPON + 1 ][ ] =
{
"", "P228", "", "Schmidt Scout", "", "XM1014 (Auto-Shotgun)", "",
"Mac-10", "AUG", "", "Dual Elites", "Five-Seven", "UMP-45", "SG-550",
"Galil", "Famas", "USP", "Glock-18", "AWP", "MP5-Navy", "M249 (Para)",
"M3 (Pump-Shotgun)", "M4A1", "TMP", "G3SG1", "", "Deagle", "SG-552",
"AK-47", "", "P90"
};
enum _:ItemsInfo
{
ITEM_LASER,
ITEM_SUICIDE,
ITEM_POISON,
ITEM_ADRENALINE,
ITEM_MEDKIT
};
new const g_szItemNames[ ItemsInfo ][ ] =
{
"Laser",
"Suicide Bomber \r(Bind Key Activated)",
"Poison Scout Bullets",
"Adrenaline \r(Bind Key Activated)",
"Medic Kit \r(Bind Key Activated)"
};
new const nightcrawler[ ] = "nightcrawler";
new const g_szNCKnife_V[ ] = "models/nightcrawler/v_nightcrawler.mdl";
new const human[ ] = "human";
new const g_szHUKnife_V[ ] = "models/human/v_human.mdl";
new const g_szLaserSprite[ ] = "sprites/zbeam4.spr";
new const g_szExplosionSprite[ ] = "sprites/zerogxplode.spr";
new const g_szSuicideBombSound[ ] = "weapons/c4_beep4.wav";
new bool:g_bRememberGuns[ 33 ];
new bool:g_bNCNextRound[ 33 ];
new bool:g_bHasLaser[ 33 ];
new bool:g_bAdrenalineActive[ 33 ];
new Float:g_fWallOrigin[ 33 ][ 3 ];
new g_iPrimaryWeapon[ 33 ];
new g_iSecondaryWeapon[ 33 ];
new g_iChosenItem[ 33 ];
new g_iAdrenalineUses[ 33 ];
new g_iMedKitUses[ 33 ];
new g_iSuicideTime[ 33 ];
new g_iPoisonRemaining[ 33 ];
new g_iTeamCount[ CsTeams ];
new g_iMaxPlayers;
new g_iLaserSprite;
new g_iExplosionSprite;
new g_hWeaponMenu;
new g_hPrimaryWeaponMenu;
new g_hSecondaryWeaponMenu;
new g_hItemsMenu;
new g_msgShowMenu;
new g_msgVGUIMenu;
new g_msgDeath;
new g_msgScoreInfo;
new g_pNightcrawlerRatio;
new g_pNightcrawlerVisibleTime;
new g_pMapLighting;
new g_pAdrenalineUses;
new g_pAdrenalineTime;
new g_pAdrenalineSpeed;
new g_pMedKitUses;
new g_pSuicideRadius;
new g_pSuicideDamage;
new g_pSuicideTime;
new g_pPoisonAmount;
new g_pPoisonInterval;
new g_pPoisonDamage;
new lightStyleChar[3][] = { "b", "c", "n" };
new lightStyleNum;
new lightCounter;
new flashNum;
new bool:isFlashing;
new lightPoints[MAX_LIGHT_POINTS];
new lightBeam;
new cvar_t_yerden_silah_alamaz;
new saglik;
new saglik_seviye;
new g_sure[33];
new tag[] = "[NightCrawler Mod]";
new amx_gamename;
public plugin_precache()
{
new temp[128];
formatex(temp, sizeof(temp)-1, "models/player/%s/%s.mdl", nightcrawler, nightcrawler);
precache_model(temp);
formatex(temp, sizeof(temp)-1, "models/player/%s/%s.mdl", human, human);
precache_model(temp);
precache_model( g_szNCKnife_V );
precache_model( g_szHUKnife_V );
precache_sound( g_szSuicideBombSound );
precache_sound(ZOMBIE_THUNDER_1);
precache_sound(ZOMBIE_THUNDER_2);
precache_sound("sound/kalpatisi.wav");
lightBeam = precache_model("sprites/laserbeam.spr");
server_cmd("sv_skyname dark");
engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_rain"));
new Fog = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_fog"));
set_keyvalue(Fog, "density", "0.000");
set_keyvalue(Fog, "rendercolor", "001 001 001");
g_iLaserSprite = precache_model( g_szLaserSprite );
g_iExplosionSprite = precache_model( g_szExplosionSprite );
}
public plugin_init()
{
register_plugin( "Nightcrawler Mod", "1.9", "wTf." );
register_clcmd( "jointeam", "CmdJoinTeam" );
register_clcmd( "joinclass", "CmdJoinTeam" );
register_clcmd( "say /guns", "CmdEnableGuns" );
register_clcmd( "item", "CmdUseItem" );
amx_gamename = register_cvar( "amx_gamename", "NightCrawler Mod By. Optimist" );
RegisterHam( Ham_Spawn, "player", "OyuncuDogunca", 1 );
RegisterHam( Ham_Killed, "player", "OyuncuOldurunce", 1 );
RegisterHam( Ham_TakeDamage, "player", "OyuncuHasar", 1 );
//RegisterHam( Ham_TakeDamage, "player", "OyuncuHasar_Post", 1 );
RegisterHam( Ham_Touch, "weaponbox", "TYerdenSilahAlamaz" );
RegisterHam( Ham_Touch, "armoury_entity", "TYerdenSilahAlamaz" );
RegisterHam( Ham_Touch, "weapon_shield", "TYerdenSilahAlamaz" );
RegisterHam( Ham_BloodColor, "player", "KanEfektiniKaldir" );
register_logevent( "LogEvent_RoundEnd", 2, "1=Round_End" );
register_event( "CurWeapon", "Event_CurWeapon", "be" );
register_menucmd( register_menuid( "Team_Select", 1 ), ( 1 << 0 ) | ( 1 << 1 ) | ( 1 << 4 ) | ( 1 << 5 ), "TeamSelectMenu_Handler" );
g_msgShowMenu = get_user_msgid( "ShowMenu" );
g_msgVGUIMenu = get_user_msgid( "VGUIMenu" );
g_msgScoreInfo = get_user_msgid( "ScoreInfo" );
g_msgDeath = get_user_msgid( "DeathMsg" );
register_message( g_msgShowMenu, "Message_ShowMenu" );
register_message( g_msgVGUIMenu, "Message_VGUIMenu" );
register_message( get_user_msgid("StatusIcon"), "AlisVerisEngel" );
register_message( get_user_msgid("DeathMsg"), "Mesaj_Gizle" );
register_forward(FM_CmdStart, "C4YerlestirmeEngel", 0);
register_forward( FM_GetGameDescription, "NightCrawler" );
cvar_t_yerden_silah_alamaz = register_cvar("cs_t_yerden_silah_alamaz", "1");
saglik_seviye = register_cvar("saglik_seviye","25");
saglik = CreateHudSyncObj();
new iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "ambient_generic"));
if(iEnt)
{
dllfunc(DLLFunc_Think, iEnt);
set_pev(iEnt, pev_classname, CLASS_WEATHER_EFFECTS);
set_keyvalue(iEnt, "message", ZOMBIE_THUNDER_1);
set_keyvalue(iEnt, "targetname", "wather");
set_keyvalue(iEnt, "pitchstart", "100");
set_keyvalue(iEnt, "pitch", "100");
set_keyvalue(iEnt, "health", "10");
set_keyvalue(iEnt, "spawnflags", "49");
dllfunc(DLLFunc_Spawn, iEnt);
set_pev(iEnt, pev_nextthink, get_gametime() + 2.0);
register_forward(FM_Think, "Fwd_Think", 1);
}
g_pNightcrawlerRatio = register_cvar( "nc_ratio", "33" );
g_pNightcrawlerVisibleTime = register_cvar( "nc_visible_time", "5" );
g_pMapLighting = register_cvar( "nc_lighting", "g" );
g_pAdrenalineUses = register_cvar( "nc_adrenaline_uses", "2" );
g_pAdrenalineTime = register_cvar( "nc_adrenaline_time", "10" );
g_pAdrenalineSpeed = register_cvar( "nc_adrenaline_speed", "320" );
g_pSuicideDamage = register_cvar( "nc_suicide_damage", "80" );
g_pSuicideRadius = register_cvar( "nc_suicide_radius", "50" );
g_pSuicideTime = register_cvar( "nc_suicide_time", "3" );
g_pMedKitUses = register_cvar( "nc_medkit_uses", "2" );
g_pPoisonAmount = register_cvar( "nc_poison_amount", "3" );
g_pPoisonInterval = register_cvar( "nc_poison_interval", "1" );
g_pPoisonDamage = register_cvar( "nc_poison_damage", "5" );
g_iMaxPlayers = get_maxplayers();
set_task( 15.0, "Task_StartGame" );
set_task( 60.0,"tanit_beni",3476,"",0,"b" );
CreateMenus();
}
public client_putinserver( id )
{
g_bRememberGuns[ id ] = false;
g_bNCNextRound[ id ] = false;
g_bHasLaser[ id ] = false;
g_bAdrenalineActive[ id ] = false;
g_iAdrenalineUses[ id ] = 0;
g_iMedKitUses[ id ] = 0;
g_iSuicideTime[ id ] = 0;
g_iPoisonRemaining[ id ] = 0;
g_iPrimaryWeapon[ id ] = 0;
g_iSecondaryWeapon[ id ] = 0;
g_iChosenItem[ id ] = -1;
new szLighting[ 3 ];
get_pcvar_string( g_pMapLighting, szLighting, 2 );
engfunc( EngFunc_LightStyle, 0, szLighting );
}
public client_connect(id)
{
g_sure[id] = 0;
set_task(0.1,"HpDolsun",id + 300500,"",0,"b");
}
public client_disconnect( id )
{
remove_task( TASK_SUICIDE + id );
g_sure[id] = 0;
remove_task(id + 300500);
}
public client_PreThink( id )
{
if( !is_user_alive( id ) )
return;
static CsTeams:iTeam;
iTeam = cs_get_user_team( id );
if( iTeam == TEAM_HUMAN )
{
if( !g_bHasLaser[ id ] )
{
static iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum, "ae", "CT" );
if( iNum == 1 )
{
g_bHasLaser[ id ] = true;
}
}
if( g_bHasLaser[ id ] )
{
static iTarget, iBody, iRed, iGreen, iBlue, iWeapon;
get_user_aiming( id, iTarget, iBody );
iWeapon = get_user_weapon( id );
if( IsPrimaryWeapon( iWeapon ) || IsSecondaryWeapon( iWeapon ) )
{
if( is_user_alive( iTarget ) && cs_get_user_team( iTarget ) == TEAM_NC )
{
iRed = 255;
iGreen = 0;
iBlue = 0;
}
else
{
iRed = 0;
iGreen = 255;
iBlue = 0;
}
static iOrigin[ 3 ];
get_user_origin( id, iOrigin, 3 );
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_BEAMENTPOINT );
write_short( id | 0x1000 );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] );
write_short( g_iLaserSprite );
write_byte( 1 );
write_byte( 10 );
write_byte( 1 );
write_byte( 5 );
write_byte( 0 );
write_byte( iRed );
write_byte( iGreen );
write_byte( iBlue );
write_byte( 150 );
write_byte( 25 );
message_end( );
}
}
}
else if( iTeam == TEAM_NC )
{
static iButton;
iButton = get_user_button( id );
if( iButton & IN_USE )
{
static Float:fOrigin[ 3 ];
pev( id, pev_origin, fOrigin );
if( get_distance_f( fOrigin, g_fWallOrigin[ id ] ) > 10.0 )
return;
if( pev( id, pev_flags ) & FL_ONGROUND )
return;
if( iButton & IN_FORWARD )
{
static Float:fVelocity[ 3 ];
velocity_by_aim( id, 240, fVelocity );
set_pev( id, pev_velocity, fVelocity );
}
else if( iButton & IN_BACK )
{
static Float:fVelocity[ 3 ];
velocity_by_aim( id, -240, fVelocity );
set_pev( id, pev_velocity, fVelocity );
}
}
}
return;
}
public client_authorized(id)
{
set_task(1.0, "messages", id, _, _, "b");
}
public messages(id)
{
if(is_user_connected(id) && is_user_alive(id) )
{
new hp,saglik_seviye2;
saglik_seviye2 = get_pcvar_num(saglik_seviye);
hp = get_user_health(id);
if(hp >= saglik_seviye2)
{
set_hudmessage(255, 79, 79, 0.02, 0.23, 1, 0.02, 1.0, 0.01, 0.1, 10);
ShowSyncHudMsg(id, saglik,"Saglik : [NORMAL]");
}
else if(hp < saglik_seviye2 && is_user_alive(id))
{
client_cmd(id,"spk sound/kalpatisi");
set_hudmessage(255, 79, 79, 0.02, 0.23, 1, 0.02, 1.0, 0.01, 0.1, 10);
ShowSyncHudMsg(id, saglik, "Saglik : [KRITIK]");
new key = random_num(1,3);
switch(key)
{
case 1:
{
UTIL_ScreenFade(id, {100,0,0}, 0.4, 0.1, 230, FFADE_OUT | FFADE_STAYOUT, false,false);
}
case 2:
{
UTIL_ScreenFade(id, {100,0,0}, 0.7, 0.1, 230, FFADE_IN, false,false);
}
case 3:
{
UTIL_ScreenFade(id,{100,0,0},1.0,0.2,255,FFADE_IN,false,false);
}
}
}
}
else
{
set_hudmessage(255, 79, 79, 0.02, 0.23, 1, 0.02, 1.0, 0.01, 0.1, 10);
ShowSyncHudMsg(id, saglik,"[OLU]");
}
return PLUGIN_HANDLED;
}
stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=FFADE_IN,bool:bReliable=false,bool:bExternal=false)
{
if( id && !is_user_connected(id))
return;
new iFadeTime;
if( flFxTime == -1.0 )
{
iFadeTime = 4;
}
else
{
iFadeTime = FixedUnsigned16( flFxTime , 1<<12 );
}
static gmsgScreenFade;
if( !gmsgScreenFade )
{
gmsgScreenFade = get_user_msgid("ScreenFade");
}
new MSG_DEST;
if( bReliable )
{
MSG_DEST = id ? MSG_ONE : MSG_ALL;
}
else
{
MSG_DEST = id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST;
}
if( bExternal )
{
emessage_begin( MSG_DEST, gmsgScreenFade, _, id );
ewrite_short( iFadeTime );
ewrite_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
ewrite_short( iFlags );
ewrite_byte( iColor[Kirmizi] );
ewrite_byte( iColor[Yesil] );
ewrite_byte( iColor[Mavi] );
ewrite_byte( iAlpha );
emessage_end();
}
else
{
message_begin( MSG_DEST, gmsgScreenFade, _, id );
write_short( iFadeTime );
write_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
write_short( iFlags );
write_byte( iColor[Kirmizi] );
write_byte( iColor[Yesil] );
write_byte( iColor[Mavi] );
write_byte( iAlpha );
message_end();
}
}
stock FixedUnsigned16(Float:flValue, iScale)
{
new iOutput;
iOutput = floatround(flValue * iScale);
if ( iOutput < 0 )
iOutput = 0;
if ( iOutput > 0xFFFF )
iOutput = 0xFFFF;
return iOutput;
}
public hasaralinca( vurulan, zirh, vuran, Float:hasar, hasarturu )
{
if( is_user_connected(vurulan) && is_user_connected(vuran) && is_user_alive(vurulan))
{
g_sure[vurulan] = floatround(hasar);
}
}
public HpDolsun(taskid)
{
new id = taskid - 300500;
if(is_user_connected(id) && is_user_alive(id))
{
if(g_sure[id] > 0)
{
g_sure[id] -= 1;
}
if(g_sure[id] == 0 && get_user_health(id) < 100)
{
set_user_health(id, get_user_health(id) + 1);
}
else
{
g_sure[id] = 0;
}
}
}
public LogEvent_RoundEnd()
{
new CsTeams:iTeam;
for( new i = 1; i <= g_iMaxPlayers; i++ )
{
if( !is_user_connected( i ) )
continue;
iTeam = cs_get_user_team( i );
switch( iTeam )
{
case TEAM_NC:
{
if( !g_bNCNextRound[ i ] )
cs_set_user_team( i, TEAM_NC );
}
case TEAM_HUMAN:
{
if( g_bNCNextRound[ i ] )
cs_set_user_team( i, TEAM_HUMAN );
}
}
g_bNCNextRound[ i ] = false;
}
CountTeams();
new iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum );
new iNCAmount = ( get_pcvar_num( g_pNightcrawlerRatio ) * iNum ) / 100 - g_iTeamCount[ TEAM_NC ];
if( iNCAmount > 0 )
{
new iRandom;
for( new i = 0, iPlayer; i < iNCAmount; i++ )
{
iRandom = random( iNum );
if( cs_get_user_team( iPlayer ) == TEAM_NC )
{
i--;
continue;
}
cs_set_user_team( iPlayers[ iRandom ], TEAM_NC );
iPlayers[ iRandom ] = iPlayers[ --iNum ];
}
}
else if( iNCAmount < 0 )
{
new iRandom;
for( new i = 0, iPlayer; i < iNCAmount * -1; i++ )
{
iRandom = random( iNum );
if( cs_get_user_team( iPlayer ) == TEAM_HUMAN )
{
i--;
continue;
}
cs_set_user_team( iPlayers[ iRandom ], TEAM_HUMAN );
iPlayers[ iRandom ] = iPlayers[ --iNum ];
}
}
}
public CmdJoinTeam( id )
return PLUGIN_HANDLED;
public TeamSelectMenu_Handler( id, iKey )
{
new CsTeams:iTeam = cs_get_user_team( id );
CountTeams();
switch( iKey )
{
case 0:
{
ColorChat(0, NORMAL, "%s: You cannot join the Night-Crawler team!", tag );
return PLUGIN_HANDLED;
}
case 1:
{
if( iTeam == TEAM_HUMAN )
return PLUGIN_HANDLED;
ForceTeam( id, CS_TEAM_CT );
return PLUGIN_HANDLED;
}
case 5:
{
user_silentkill( id );
ForceTeam( id, CS_TEAM_SPECTATOR );
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
public ForceTeam( id, CsTeams:iTeam )
{
static iRestore, iVGUI, iMSGBlock;
iRestore = get_pdata_int( id, m_iVGUI );
iVGUI = iRestore & ( 1 << 0 );
if( iVGUI )
set_pdata_int( id, m_iVGUI, iRestore & ~( 1 << 0 ) );
switch( iTeam )
{
case CS_TEAM_SPECTATOR:
{
iMSGBlock = get_msg_block( g_msgShowMenu );
set_msg_block( g_msgShowMenu, BLOCK_ONCE );
dllfunc( DLLFunc_ClientPutInServer, id );
set_msg_block( g_msgShowMenu, iMSGBlock );
set_pdata_int( id, m_fGameHUDInitialized, 1 );
engclient_cmd( id, "jointeam", "6" );
}
case CS_TEAM_T, CS_TEAM_CT:
{
iMSGBlock = get_msg_block( g_msgShowMenu );
set_msg_block( g_msgShowMenu, BLOCK_ONCE );
engclient_cmd( id, "jointeam", ( iTeam == CS_TEAM_CT ) ? "2" : "1" );
engclient_cmd( id, "joinclass", "1" );
set_msg_block( g_msgShowMenu, iMSGBlock );
}
}
if( iVGUI )
set_pdata_int( id, m_iVGUI, iRestore );
}
public Message_VGUIMenu( iMSGId, iDest, id )
{
static iMSGArg1;
iMSGArg1 = get_msg_arg_int( 1 );
if( iMSGArg1 == 2 )
{
show_menu( id, 51, TEAM_MENU2, -1 );
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public Message_ShowMenu( iMSGId, iDest, id )
{
static iMSGArg1;
iMSGArg1 = get_msg_arg_int( 1 );
if( iMSGArg1 != 531 && iMSGArg1 != 563 )
return PLUGIN_CONTINUE;
show_menu( id, 51, TEAM_MENU2, -1 );
return PLUGIN_HANDLED;
}
public AlisVerisEngel(msgid, msgdest, id)
{
static szIcon[8];
get_msg_arg_string(2, szIcon, 7);
if(equal(szIcon, "buyzone") && get_msg_arg_int(1))
{
set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public Mesaj_Gizle()
{
new iKiller = get_msg_arg_int(1);
if( IsPlayer(iKiller) && get_user_team(iKiller) == 1 )
{
set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(2));
}
}
public C4YerlestirmeEngel(plr, uc_handle, seed)
{
static clip, ammo;
if( !is_user_alive(plr)
|| get_user_weapon(plr, clip, ammo) != CSW_C4 )
{
return FMRES_IGNORED;
}
new buttons = get_uc(uc_handle, UC_Buttons);
if( buttons&IN_ATTACK )
{
buttons &= ~IN_ATTACK;
set_uc(uc_handle, UC_Buttons, buttons);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
public NightCrawler( )
{
static gamename[32];
get_pcvar_string( amx_gamename, gamename, 31 );
forward_return( FMV_STRING, gamename );
return FMRES_SUPERCEDE;
}
public TYerdenSilahAlamaz(weapon, id)
{
if (get_pcvar_num(cvar_t_yerden_silah_alamaz) && is_user_alive(id) && get_user_team(id) == 1)
return HAM_SUPERCEDE;
return HAM_IGNORED;
}
public KanEfektiniKaldir ( const Client )
{
SetHamReturnInteger(-1);
return HAM_SUPERCEDE;
}
public Fwd_Think(iEnt)
{
if(!pev_valid(iEnt))
return FMRES_IGNORED;
static className[32];
pev(iEnt, pev_classname, className, 31);
if(equal(className, CLASS_WEATHER_EFFECTS))
{
static thinkReturn, randNum;
if(!isFlashing)
{
randNum = random_num(0, 1);
if(randNum)
set_pev(iEnt, pev_message, ZOMBIE_THUNDER_1);
else
set_pev(iEnt, pev_message, ZOMBIE_THUNDER_2);
isFlashing = true;
flashNum = random_num(1, 3);
dllfunc(DLLFunc_Use, iEnt, 0);
static Victim;
Victim = get_random_player();
if(Victim)
CreateLightningPoints(Victim);
}
thinkReturn = LightsEffect();
if(thinkReturn)
set_pev(iEnt, pev_nextthink, get_gametime() + random_float(2.5, 12.5));
else
set_pev(iEnt, pev_nextthink, get_gametime() + 0.1);
}
return FMRES_HANDLED;
}
stock LightsEffect()
{
switch(flashNum)
{
case 1:
{
lightCounter += 1;
switch(lightCounter)
{
case 1: { lightStyleNum = 1; }
case 2: { lightStyleNum = 2; }
case 3: { lightStyleNum = 1; }
case 4: { lightStyleNum = 0; }
}
engfunc(EngFunc_LightStyle, 0, lightStyleChar[lightStyleNum]);
if(lightCounter == 4)
{
lightCounter = 0;
isFlashing = false;
return 1;
}
else
return 0;
}
case 2:
{
lightCounter += 1;
switch(lightCounter)
{
case 1: { lightStyleNum = 1; }
case 2: { lightStyleNum = 2; }
case 3: { lightStyleNum = 1; }
case 4: { lightStyleNum = 2; }
case 5: { lightStyleNum = 1; }
case 6: { lightStyleNum = 0; }
}
engfunc(EngFunc_LightStyle, 0, lightStyleChar[lightStyleNum]);
if(lightCounter == 6)
{
lightCounter = 0;
isFlashing = false;
return 1;
}
else
return 0;
}
case 3:
{
lightCounter += 1;
switch(lightCounter)
{
case 1: { lightStyleNum = 1; }
case 2: { lightStyleNum = 2; }
case 3: { lightStyleNum = 1; }
case 4: { lightStyleNum = 2; }
case 5: { lightStyleNum = 1; }
case 6: { lightStyleNum = 2; }
case 7: { lightStyleNum = 1; }
case 8: { lightStyleNum = 0; }
}
engfunc(EngFunc_LightStyle, 0, lightStyleChar[lightStyleNum]);
if(lightCounter == 8)
{
lightCounter = 0;
isFlashing = false;
return 1;
}
else
return 0;
}
}
return 1;
}
public CreateLightningPoints(id)
{
static Ent, x, Float:Vel[3], Float:Origin[3];
static Float:Mins[3] = { -1.0, -1.0, -1.0 };
static Float:Maxs[3] = { 1.0, 1.0, 1.0 };
new Float:Dist = is_user_outside(id) - 5.0;
pev(id, pev_origin, Origin);
if(Dist > 700.0)
Dist = 700.0;
Origin[2] += Dist;
for(x = 0 ; x < MAX_LIGHT_POINTS ; x++)
{
Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_sprite"));
set_pev(Ent, pev_movetype, MOVETYPE_FLY);
set_pev(Ent, pev_solid, SOLID_TRIGGER);
set_pev(Ent, pev_renderamt, 0.0);
set_pev(Ent, pev_rendermode, kRenderTransAlpha);
engfunc(EngFunc_SetModel, Ent, "models/w_usp.mdl");
set_pev(Ent, pev_mins, Mins);
set_pev(Ent, pev_maxs, Maxs);
Vel[0] = random_float(-500.0, 500.0);
Vel[1] = random_float(-500.0, 500.0);
Vel[2] = random_float((Dist <= 700.0 ? 0.0 : -100.0), (Dist <= 700.0 ? 0.0 : 50.0));
set_pev(Ent, pev_origin, Origin);
set_pev(Ent, pev_velocity, Vel);
lightPoints[x] = Ent;
}
set_task(0.3, "Lightning", id);
return 1;
}
public Lightning(id)
{
new x, a, b, Rand;
static Endpoint = MAX_LIGHT_POINTS - 1;
while(x < Endpoint)
{
a = lightPoints[x];
b = lightPoints[x + 1];
x++;
if(x == Endpoint)
{
Rand = random(100);
if(Rand == 1)
b = id;
}
CreateBeam(a, b);
}
for(x = 0 ; x < MAX_LIGHT_POINTS ; x++)
{
if(pev_valid(lightPoints[x]))
engfunc(EngFunc_RemoveEntity, lightPoints[x]);
}
}
stock set_keyvalue(ent, key[], value[])
{
new classname[32];
pev(ent, pev_classname, classname, 31);
set_kvd(0, KV_ClassName, classname);
set_kvd(0, KV_KeyName, key);
set_kvd(0, KV_Value, value);
set_kvd(0, KV_fHandled, 0);
dllfunc(DLLFunc_KeyValue, ent, 0);
}
stock get_random_player()
{
new Cnt, Total[33];
new Players[32], Num, id;
get_players(Players, Num);
for(new i = 0 ; i < Num ; i++)
{
id = Players[i];
if(!is_user_alive(id))
continue;
if(is_user_outside(id))
Total[Cnt++] = id;
}
if(Cnt)
return Total[random(Cnt)];
return 0;
}
stock Float:is_user_outside(id)
{
new Float:origin[3], Float:dist;
pev(id, pev_origin, origin);
dist = origin[2];
while(engfunc(EngFunc_PointContents, origin) == -1)
origin[2] += 5.0;
if(engfunc(EngFunc_PointContents, origin) == -6)
return (origin[2] - dist);
return 0.0;
}
stock CreateBeam(id, Ent)
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(8);
write_short(id);
write_short(Ent);
write_short(lightBeam);
write_byte(0);
write_byte(10);
write_byte(5);
write_byte(8);
write_byte(100);
write_byte(200); //R
write_byte(200); //G
write_byte(255); //B
write_byte(255);
write_byte(10);
message_end();
}
public Event_CurWeapon( id )
{
new iWeapon = read_data( 2 );
if( IsPrimaryWeapon( iWeapon ) || IsSecondaryWeapon( iWeapon ) )
{
if( cs_get_user_bpammo( id, iWeapon ) != g_iMaxBPAmmo[ iWeapon ] )
{
cs_set_user_bpammo( id, iWeapon, g_iMaxBPAmmo[ iWeapon ] );
}
if( g_bAdrenalineActive[ id ] )
{
new iEnt = find_ent_by_owner( -1, g_szWeaponClassnames[ iWeapon ], id );
if( !pev_valid( iEnt ) )
return;
cs_set_weapon_ammo( iEnt, g_iMaxClipAmmo[ iWeapon ] );
}
}
if( g_bAdrenalineActive[ id ] )
{
set_user_maxspeed( id, get_pcvar_float( g_pAdrenalineSpeed ) );
}
}
public CreateMenus()
{
g_hWeaponMenu = menu_create( "Silah Menusu", "WeaponMenu_Handler" );
menu_additem( g_hWeaponMenu, "Yeni Silahlar", "0" );
menu_additem( g_hWeaponMenu, "Onceki Duzen", "1" );
menu_additem( g_hWeaponMenu, "Menuyu Tekrar Gosterme", "2" );
g_hPrimaryWeaponMenu = menu_create( "Birincil Silahlar", "PrimaryMenu_Handler" );
g_hSecondaryWeaponMenu = menu_create( "Ikincil Silahlar", "SecondaryMenu_Handler" );
new szInfo[ 3 ];
for( new i = MIN_WEAPON; i <= MAX_WEAPON; i++ )
{
if( IsPrimaryWeapon( i ) )
{
num_to_str( i, szInfo, charsmax( szInfo ) );
menu_additem( g_hPrimaryWeaponMenu, g_szWeaponNames[ i ], szInfo );
}
else if( IsSecondaryWeapon( i ) )
{
num_to_str( i, szInfo, charsmax( szInfo ) );
menu_additem( g_hSecondaryWeaponMenu, g_szWeaponNames[ i ], szInfo );
}
else continue;
}
g_hItemsMenu = menu_create( "Bir Item Secin:", "ItemsMenu_Handler" );
for( new i = 0; i < ItemsInfo; i++ )
{
num_to_str( i, szInfo, charsmax( szInfo ) );
if( i == ITEM_LASER )
{
menu_additem( g_hItemsMenu, g_szItemNames[ i ], szInfo, _, menu_makecallback( "LaserItem_Callback" ) );
}
else menu_additem( g_hItemsMenu, g_szItemNames[ i ], szInfo );
}
}
public LaserItem_Callback( id, hMenu, iItem )
{
new iFrags = get_user_frags( id );
new iDeaths = get_user_deaths( id );
new iPlayerFrags;
new iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum, "ae", "CT" );
for( new i = 1; i <= g_iMaxPlayers; i++ )
{
if( !is_user_alive( i ) || cs_get_user_team( i ) != TEAM_HUMAN || i == id )
continue;
iPlayerFrags = get_user_frags( i );
if( iPlayerFrags > iFrags )
return ITEM_DISABLED;
else if( iPlayerFrags == iFrags )
{
if( get_user_deaths( i ) < iDeaths )
return ITEM_DISABLED;
}
}
return ITEM_ENABLED;
}
public OyuncuDogunca( id )
{
if( !is_user_alive( id ) && pev( id, pev_maxspeed ) != 1.0 )
return HAM_IGNORED;
strip_user_weapons( id );
give_item( id, "weapon_knife" );
new CsTeams:iTeam = cs_get_user_team( id );
if( g_bNCNextRound[ id ] )
{
if( iTeam != TEAM_NC )
{
cs_set_user_team( id, TEAM_NC );
}
g_bNCNextRound[ id ] = false;
}
switch( iTeam )
{
case TEAM_NC:
{
cs_set_user_model( id, "nightcrawler" );
set_pev( id, pev_viewmodel2, g_szNCKnife_V );
SetInvisible(id, true);
set_user_footsteps(id, 1);
cs_set_user_nvg(id, 1);
set_pev( id, pev_maxspeed, g_fHiz );
}
case TEAM_HUMAN:
{
set_pev(id, pev_effects, pev(id, pev_effects) &~ EF_BRIGHTLIGHT);
if( g_bRememberGuns[ id ] )
GiveWeapons( id );
else if( g_iPrimaryWeapon[ id ] == 0 || g_iSecondaryWeapon[ id ] == 0 )
{
menu_display( id, g_hPrimaryWeaponMenu );
}
else menu_display( id, g_hWeaponMenu );
cs_set_user_model( id, "human" );
set_pev( id, pev_viewmodel2, g_szHUKnife_V );
set_pev(id,pev_effects,EF_BRIGHTLIGHT);
}
}
g_bNCNextRound[ id ] = false;
return HAM_IGNORED;
}
public OyuncuOldurunce( iVictim, iKiller, iAttacker, iShouldGib )
{
if( is_user_connected( iAttacker ) && iVictim != iAttacker && get_user_team(iAttacker) == 2)
give_item(iAttacker,"weapon_hegrenade");
}
public OyuncuHasar( iVictim, iInflictor, iAttacker, Float:flDamage, iBits, dmg_type )
{
if( !is_user_alive( iAttacker ) && cs_get_user_team( iVictim ) == TEAM_NC )
{
remove_task( TASK_INVISIBLE + iVictim );
set_user_rendering( iVictim );
set_task( get_pcvar_float( g_pNightcrawlerVisibleTime ), "Task_SetInvisble", iVictim + TASK_INVISIBLE );
if( g_iChosenItem[ iAttacker ] == ITEM_POISON && iInflictor == CSW_SCOUT )
{
g_iPoisonRemaining[ iVictim ] = get_pcvar_num( g_pPoisonAmount );
remove_task( TASK_POISON + iVictim );
set_task( get_pcvar_float( g_pPoisonInterval ), "Task_Poison", TASK_POISON + iVictim );
}
}
if(dmg_type & DMG_HEGRENADE && iVictim == iAttacker)
return HAM_SUPERCEDE;
return HAM_IGNORED;
}
public Task_Poison( iTaskID )
{
new id = iTaskID - TASK_POISON;
ExecuteHamB( Ham_TakeDamage, id, 0, 0, get_pcvar_float( g_pPoisonDamage ), DMG_GENERIC );
if( --g_iPoisonRemaining[ id ] > 0 )
{
set_task( get_pcvar_float( g_pPoisonInterval ), "Task_PoisonHurt", iTaskID );
}
}
public GiveWeapons( id )
{
new iPrimary = g_iPrimaryWeapon[ id ];
new iSecondary = g_iSecondaryWeapon[ id ];
give_item( id, g_szWeaponClassnames[ iPrimary ] );
give_item( id, g_szWeaponClassnames[ iSecondary ] );
cs_set_user_bpammo( id, iPrimary, g_iMaxBPAmmo[ iPrimary ] );
cs_set_user_bpammo( id, iSecondary, g_iMaxBPAmmo[ iSecondary ] );
}
public WeaponMenu_Handler( id, hMenu, iItem )
{
switch( iItem )
{
case 0: menu_display( id, g_hPrimaryWeaponMenu, 0 );
case 1:
{
GiveWeapons( id );
menu_display( id, g_hItemsMenu, 0 );
}
case 2:
{
GiveWeapons( id );
g_bRememberGuns[ id ] = true;
menu_display( id, g_hItemsMenu, 0 );
}
}
}
public PrimaryMenu_Handler( id, hMenu, iItem )
{
if( iItem == MENU_EXIT )
{
menu_display( id, g_hItemsMenu, 0 );
return PLUGIN_HANDLED;
}
new iAccess, hCallback;
new szData[ 6 ];
menu_item_getinfo( hMenu, iItem, iAccess, szData, charsmax( szData ), _, _, hCallback );
g_iPrimaryWeapon[ id ] = str_to_num( szData );
menu_display( id, g_hSecondaryWeaponMenu, 0 );
return PLUGIN_HANDLED;
}
public SecondaryMenu_Handler( id, hMenu, iItem )
{
if( iItem == MENU_EXIT )
{
menu_display( id, g_hItemsMenu, 0 );
return PLUGIN_HANDLED;
}
new iAccess, hCallback;
new szData[ 6 ];
menu_item_getinfo( hMenu, iItem, iAccess, szData, charsmax( szData ), _, _, hCallback );
g_iSecondaryWeapon[ id ] = str_to_num( szData );
GiveWeapons( id );
menu_display( id, g_hItemsMenu, 0 );
return PLUGIN_HANDLED;
}
public ItemsMenu_Handler( id, hMenu, iItem )
{
g_iChosenItem[ id ] = iItem;
switch( iItem )
{
case ITEM_LASER:
{
g_bHasLaser[ id ] = true;
}
case ITEM_ADRENALINE:
{
ColorChat(0, NORMAL, "%s: Bind a key to 'item' to inject adrenaline.", tag );
g_iAdrenalineUses[ id ] = get_pcvar_num( g_pAdrenalineUses );
}
case ITEM_MEDKIT:
{
ColorChat(0, NORMAL, "%s: Bind a key to 'item' to inject adrenaline.", tag );
g_iMedKitUses[ id ] = get_pcvar_num( g_pMedKitUses );
}
case ITEM_SUICIDE:
{
}
case ITEM_POISON:
{
ColorChat(0, NORMAL, "%s: All bullets fired with a scout will be poisonous.", tag );
}
}
return PLUGIN_HANDLED;
}
public Task_StartGame()
{
new iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum );
new iNCAmount = ( get_pcvar_num( g_pNightcrawlerRatio ) * iNum ) / 100 - g_iTeamCount[ TEAM_NC ];
new iRandom;
for( new i = 0; i < iNCAmount; i++ )
{
iRandom = random( iNum );
cs_set_user_team( iPlayers[ iRandom ], TEAM_NC );
iPlayers[ iRandom ] = iPlayers[ --iNum ];
}
server_cmd( "sv_restartround 1 " );
server_cmd( "cl_bob 0");
server_cmd( "mp_freeztime 0");
server_cmd( "cl_bobcycle 0");
}
public tanit_beni(TaskID)
{
set_hudmessage(255, 255, 255, 0.01, 0.30, 0, 6.0, 6.0);
ColorChat( 0, NORMAL, "%s: NightCrawler Mod --> Bu Mod By. Optimist Tarafindan Yapilmistir.!!", tag );
}
public CmdEnableGuns( id )
{
if( g_bRememberGuns[ id ] )
{
client_print( id, print_chat, "%s Silah menunuz acildi.", tag );
g_bRememberGuns[ id ] = false;
}
else
client_print( id, print_chat, "%s Silah menunuz zaten acik!", tag );
}
public CmdUseItem( id )
{
switch( cs_get_user_team( id ) )
{
case TEAM_HUMAN:
{
switch( g_iChosenItem[ id ] )
{
case ITEM_ADRENALINE:
{
if( g_bAdrenalineActive[ id ] )
{
client_print( id, print_chat, "%s Adrenaline is already active!", tag );
}
else if( g_iAdrenalineUses[ id ] > 0 )
{
g_iAdrenalineUses[ id ]--;
client_print( id, print_chat, "%s You have injected adrenaline!", tag );
g_bAdrenalineActive[ id ] = true;
set_user_maxspeed( id, get_pcvar_float( g_pAdrenalineSpeed ) );
set_task( get_pcvar_float( g_pAdrenalineTime ), "Task_RemoveAdrenaline", TASK_ADRENALINE + id );
}
}
case ITEM_MEDKIT:
{
if( g_iMedKitUses[ id ] > 0 )
{
g_iMedKitUses[ id ]--;
client_print( id, print_chat, "%s You have used one of your medical kits. You have %i more.", tag, g_iMedKitUses[ id ] );
set_user_health( id, 100 );
}
}
case ITEM_SUICIDE:
{
if( task_exists( TASK_SUICIDE + id ) )
return;
g_iSuicideTime[ id ] = get_pcvar_num( g_pSuicideTime );
Task_Suicide( TASK_SUICIDE + id );
set_task( 1.0, "Task_Suicide", TASK_SUICIDE + id, .flags="a", .repeat=g_iSuicideTime[ id ] );
}
}
}
}
}
public Task_SetInvisible( iTaskID )
{
new id = iTaskID - TASK_INVISIBLE;
if( is_user_alive( id ) )
{
SetInvisible( id, true );
}
}
public Task_Suicide( iTaskID )
{
new id = iTaskID - TASK_SUICIDE;
if( --g_iSuicideTime[ id ] == 0 )
{
new Float:flOrigin[ 3 ];
pev( id, pev_origin, flOrigin );
user_kill( id );
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_EXPLOSION );
write_coord( floatround( flOrigin[ 0 ] ) );
write_coord( floatround( flOrigin[ 1 ] ) );
write_coord( floatround( flOrigin[ 2 ] ) );
write_short( g_iExplosionSprite );
write_byte( 30 );
write_byte( 30 );
write_byte( 0 );
message_end();
fm_radius_damage( id, flOrigin, get_pcvar_float( g_pSuicideDamage ), get_pcvar_float( g_pSuicideRadius ), "bomb" );
}
else emit_sound( id, CHAN_ITEM, g_szSuicideBombSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM );
}
stock fm_radius_damage( id, Float:flOrigin[ 3 ], Float:flDamage, Float:flRadius, szWeaponName[ ]="" )
{
new szClassname[ 33 ], Float:flHealth, CsTeams:iTeam;
iTeam = cs_get_user_team( id );
static iEnt;
iEnt = -1;
while( ( iEnt = engfunc( EngFunc_FindEntityInSphere, iEnt, flOrigin, flRadius ) ) )
{
pev( iEnt, pev_classname, szClassname, charsmax( szClassname ) );
if( !equali( szClassname, "player" ) || !is_user_alive( iEnt ) || cs_get_user_team( iEnt ) == iTeam )
continue;
pev( iEnt, pev_health, flHealth );
flHealth -= flDamage;
if( flHealth <= 0.0 )
{
createKill( iEnt, id, szWeaponName );
}
else set_pev( iEnt, pev_health, flHealth );
}
}
stock createKill(id, attacker, weaponDescription[])
{
new iFrags, iFrags2;
if(id != attacker)
{
iFrags = get_user_frags(attacker);
set_user_frags(attacker, iFrags + 1);
set_msg_block(g_msgDeath,BLOCK_ONCE);
set_msg_block(g_msgScoreInfo,BLOCK_ONCE);
user_kill(id);
iFrags2 = get_user_frags(id);
set_user_frags(id, iFrags2 + 1);
message_begin(MSG_ALL, g_msgDeath,{0,0,0},0);
write_byte(attacker);
write_byte(id);
write_byte(0);
write_string(weaponDescription);
message_end();
message_begin(MSG_ALL, g_msgScoreInfo);
write_byte(attacker);
write_short(iFrags);
write_short(get_user_deaths(attacker));
write_short(0);
write_short(get_user_team(attacker));
message_end();
message_begin(MSG_ALL, g_msgScoreInfo);
write_byte(id);
write_short(iFrags2);
write_short(get_user_deaths(id));
write_short(0);
write_short(get_user_team(id));
message_end();
new szName[32], szName1[32];
get_user_name(id, szName, 31);
get_user_name(attacker, szName1, 31);
}
}
public Task_RemoveAdrenaline( iTaskID )
{
new id = iTaskID - TASK_ADRENALINE;
g_bAdrenalineActive[ id ] = false;
if( is_user_alive( id ) )
set_user_maxspeed( id, 0.0 );
}
SetInvisible( id, bool:bInvisible )
{
if( bInvisible )
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 16 );
else
set_user_rendering( id );
}
CountTeams()
{
for( new i = 1; i <= g_iMaxPlayers; i++ )
{
if( !is_user_connected( i ) )
continue;
g_iTeamCount[ cs_get_user_team( i ) ]++;
}
}
1) Nightcrawler is not working invisibility.
2) End of round replace the team.
3) Nightcrawler Team. To see through the eyes of the zombie
[IMG]http://desmond.**************/Himg442/scaled.php?server=442&filename=zmday.jpg&res= landing[/IMG]