PHP- Kodu:
/*
* Copyright © 2013 by Optimist
* Tüm Yasal Hakları Saklıdır.
*
* www.csplugin.com -> Optimist
*
* Plugin Tanıtım: Bu Plugin Sayesinde Jailbreak mod'ta "ADMIN_KICK" yetkisi olan bir Admin'in Oyunu Zombi Mod'ta oynanmasını sağlıyor.
*
* v1.1 = Gereksiz kodlar silindi böylece pluginde muhtemel kasmalar engellendi.
* v1.2 = Zombi Sınıfları eklendi böylece ct'ler zombi türü seçebilecekler. // Bu özelliği yapmamda yardımcı olan CSmiLeFaCe 'e teşekkürler...
*
*/
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <colorchat>
#define PLUGIN "[JB]: Admin Zombi Mod"
#define VERSION "1.2"
#define AUTHOR "Optimist"
#define task_bilgi 672
#define OFFSET_PRIMARYWEAPON 116
new bool:Zm_SilahDokunamama
new VIEW_ZOMBI[] = "models/admin_zombi/v_zombi_el.mdl";
new PLAYER_ZOMBI[] = "models/admin_zombi/p_zombi_el.mdl";
new zombihp[33];
new insanhp[33];
new SyncHudObj;
new yeni_nightvision;
new zombimod; // herkes
new hudmesaji;
new zombisinifi;
// Hayalet zombi
new pSilent, pAlpha, pRed, pBlue, pGreen;
// Yarasa Fırlatan Zombi
const zclass_health = 1800
const zclass_speed = 190
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 1.0
new const SOUND_FIRE[] = "zombie_plague/zombi_banshee_pulling_fire.wav"
new const SOUND_BAT_HIT[] = "zombie_plague/zombi_banshee_laugh.wav"
new const SOUND_BAT_MISS[] = "zombie_plague/zombi_banshee_pulling_fail.wav"
new const MODEL_BAT[] = "models/zombie_plague/bat_witch.mdl"
new const BAT_CLASSNAME[] = "banchee_bat"
new spr_skull
const Float:banchee_skull_bat_speed = 600.0
const Float:banchee_skull_bat_flytime = 3.0
const Float:banchee_skull_bat_catch_time = 3.0
const Float:banchee_skull_bat_catch_speed = 100.0
const Float:bat_timewait = 14.0
new g_stop[33]
new g_bat_time[33]
new g_bat_stat[33]
new g_bat_enemy[33]
new Float:g_temp_speed[33]
new g_maxplayers
new g_roundend
enum (+= 100)
{
TASK_BOT_USE_SKILL = 2367,
TASK_REMOVE_STAT
}
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)
#define ID_TASK_REMOVE_STAT (taskid - TASK_REMOVE_STAT)
public plugin_precache() {
SyncHudObj = CreateHudSyncObj();
precache_model("models/player/zombi/zombi.mdl")
precache_sound("zombimod/zombi_siren.wav")
precache_sound("zombimod/zombi_mod_baslangic.wav");
precache_sound(SOUND_FIRE)
precache_sound(SOUND_BAT_HIT)
precache_sound(SOUND_BAT_MISS)
precache_model(MODEL_BAT)
spr_skull = precache_model("sprites/ef_bat.spr")
precache_model(VIEW_ZOMBI);
precache_model(PLAYER_ZOMBI);
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /zombi","kont") // Zombi Mod Başlatma Komutu
register_clcmd("say_team /zombi","kont") // Zombi Mod Başlatma Komutu
register_clcmd("say /zm","kont") // Zombi Mod Başlatma Komutu
register_clcmd("say_team /zm","kont") // Zombi Mod Başlatma Komutu
register_clcmd("drop", "cmd_bat")
register_logevent("YeniTur",2,"0=World triggered","1=Round_Start")
register_logevent("TurSonu", 2, "1=Round_End")
register_event("HLTV", "YeniTurcuk", "a", "1=0", "2=0")
register_event("DeathMsg", "EventDeath", "a")
register_logevent("logevent_round_end", 2, "1=Round_End")
register_forward(FM_AddToFullPack, "fw_addtofullpack", 1);
register_forward(FM_PlayerPreThink,"fw_PlayerPreThink")
RegisterHam(Ham_Spawn, "player", "OyuncuDogunca", 1)
RegisterHam(Ham_Touch, "weaponbox", "SilahDokunulmaz")
RegisterHam(Ham_Touch, "armoury_entity", "SilahDokunulmaz")
RegisterHam(Ham_Touch, "weapon_shield", "SilahDokunulmaz")
RegisterHam(Ham_Touch,"info_target","EntityTouchPost",1)
RegisterHam(Ham_Think,"info_target","EntityThink")
RegisterHam(Ham_TakeDamage, "player", "fw_takedamage");
pSilent = get_cvar_pointer("zp_zombie_silent")
pAlpha = register_cvar("zp_ghost_invisibility", "1")
pRed = register_cvar("zp_ghost_glow_red", "0")
pGreen = register_cvar("zp_ghost_glow_green", "0")
pBlue = register_cvar("zp_ghost_glow_blue", "10")
zombisinifi = 1
hudmesaji = CreateHudSyncObj()
yeni_nightvision = get_user_msgid( "NVGToggle" );
g_maxplayers = get_maxplayers()
}
public YeniTur(id) {
kontrol(id);
kontrol2(id);
}
public kontrol(id) {
if(zombimod == 1) {
for(new i = 1; i < 33; i++) {
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 2) {
set_user_health(i,100);
strip_user_weapons(i)
give_item(i,"weapon_knife")
give_item(i,"weapon_ak47")
give_item(i,"weapon_m4a1")
give_item(i,"weapon_deagle")
give_item(i,"weapon_awp")
give_item(i,"weapon_hegrenade")
give_item(i,"weapon_m249")
cs_set_user_bpammo(i,CSW_AK47,90)
cs_set_user_bpammo(i,CSW_AWP,90)
cs_set_user_bpammo(i,CSW_M4A1,90)
cs_set_user_bpammo(i,CSW_DEAGLE,37)
cs_set_user_bpammo(i,CSW_M249,200)
cs_reset_user_model(i)
}
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 1) {
set_user_health(i,100);
strip_user_weapons(i)
give_item(i,"weapon_knife")
}
zombimod = 0;
}
set_lights("#OFF")
}
}
public kontrol2(id) {
if(zombimod == 1) {
for(new i = 1; i < 33; i++) {
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 1) {
set_user_health(i,100);
strip_user_weapons(i)
give_item(i,"weapon_knife")
give_item(i,"weapon_ak47")
give_item(i,"weapon_m4a1")
give_item(i,"weapon_deagle")
give_item(i,"weapon_awp")
give_item(i,"weapon_hegrenade")
give_item(i,"weapon_m249")
cs_set_user_bpammo(i,CSW_AK47,90)
cs_set_user_bpammo(i,CSW_AWP,90)
cs_set_user_bpammo(i,CSW_M4A1,90)
cs_set_user_bpammo(i,CSW_DEAGLE,37)
cs_set_user_bpammo(i,CSW_M249,200)
cs_reset_user_model(i)
}
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 2) {
set_user_health(i,100);
strip_user_weapons(i)
give_item(i,"weapon_knife")
}
zombimod = 0;
}
set_lights("#OFF")
}
}
public kont(id) {
if(get_user_team(id) == 2) {
if(get_user_flags(id) & ADMIN_KICK) {
zombihp[id] = 5000;
insanhp[id] = 150;
zm_menu(id)
}
else
{
ColorChat(id,NORMAL,"^4[Zombi Mod]:^1 Sadece ^4Admin^1'ler Bu Komutu Kullanabilir!") ;
}
}
}
public zm_menu(id) {
new hostname[64]
get_cvar_string("hostname",hostname,63)
new menu, Menuz[512]
formatex(Menuz, charsmax(Menuz), "\y%s^n\w[JB]: Admin Zombi Mod",hostname)
menu = menu_create(Menuz, "zm_menu_devam")
formatex(Menuz, charsmax(Menuz), "\wZombi HP Arttir \y[ + ]")
menu_additem(menu, Menuz, "1")
formatex(Menuz, charsmax(Menuz), "\wZombi HP Azalt \b[ - ]")
menu_additem(menu, Menuz, "2")
formatex(Menuz, charsmax(Menuz), "\wInsan HP Arttir \y[ + ]")
menu_additem(menu, Menuz, "3")
formatex(Menuz, charsmax(Menuz), "\wInsan HP Azalt \b[ - ]")
menu_additem(menu, Menuz, "4")
formatex(Menuz, charsmax(Menuz), "\wZombi Oyunu \rBaslat")
menu_additem(menu, Menuz, "5")
if(zombisinifi == 1) {
formatex(Menuz, charsmax(Menuz), "\wZombi Sinifi \r[Normal Zombi]")
menu_additem(menu, Menuz, "7")
}
else if(zombisinifi == 2) {
formatex(Menuz, charsmax(Menuz), "\wZombi Sinifi \r[Hayalet Zombi]")
menu_additem(menu, Menuz, "7")
}
else if(zombisinifi == 3) {
formatex(Menuz, charsmax(Menuz), "\wZombi Sinifi \r[Yarasa Firlatan Zombi]")
menu_additem(menu, Menuz, "7")
}
formatex(Menuz, charsmax(Menuz), "\wZombi Oyunu \yDurdur^n^n\yZombi HP \b[ %i ] \w- \yInsan HP \b[ %i ]",zombihp[id],insanhp[id])
menu_additem(menu, Menuz, "6")
formatex(Menuz, charsmax(Menuz), "\yCikis")
menu_setprop(menu,MPROP_EXITNAME,Menuz)
menu_display(id, menu, 0)
return PLUGIN_HANDLED;
}
public zm_menu_devam(id, menu, item) {
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_CONTINUE
}
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1: {
if(zombihp[id] > 4999) {
zombihp[id] += 1000;
}
zm_menu(id);
}
case 2: {
if(zombihp[id] > 5999) {
zombihp[id] -= 1000;
}
zm_menu(id);
}
case 3: {
if(insanhp[id] > 49) {
insanhp[id] += 50;
}
zm_menu(id);
}
case 4: {
if(insanhp[id] > 99) {
insanhp[id] -= 50;
}
zm_menu(id);
}
case 5:
{
for(new i = 1; i < 33; i++)
{
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 2)
{
strip_user_weapons(i)
give_item(i,"weapon_knife")
cs_set_user_model(i,"zombi")
client_cmd(i,"spk zombimod/zombi_mod_baslangic");
Zm_SilahDokunamama = true
set_pev(i, pev_viewmodel2, VIEW_ZOMBI);
set_pev(i, pev_weaponmodel2, PLAYER_ZOMBI);
if (zombisinifi == 1) {
set_user_health(i,zombihp[id]);
set_user_gnvision(i, 1)
}
else if(zombisinifi == 2) {
set_user_health(i,zombihp[id] - 1009);
set_user_gnvision(i, 0)
}
else if(zombisinifi == 3) {
set_user_health(i,zombihp[id] + 2000);
set_user_gnvision(i, 0)
}
}
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 1)
{
set_user_health(i,insanhp[id]);
give_item(i,"weapon_ak47")
give_item(i,"weapon_m4a1")
give_item(i,"weapon_deagle")
give_item(i,"weapon_awp")
give_item(i,"weapon_hegrenade")
give_item(i,"weapon_m249")
cs_set_user_bpammo(i,CSW_AK47,1000)
cs_set_user_bpammo(i,CSW_AWP,1000)
cs_set_user_bpammo(i,CSW_M4A1,1000)
cs_set_user_bpammo(i,CSW_DEAGLE,1000)
cs_set_user_bpammo(i,CSW_M249,1000)
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, 0.3, 2, 0.5, 5.0)
ShowSyncHudMsg(0, hudmesaji, "= Zombi Istilasi Basladi. = ")
for (new i = 1; i <= 32; i++)
if(is_user_connected(i) && get_user_team(i) == 1)
client_cmd(i,"spk zombimod/zombi_siren");
}
zombimod = 1;
}
set_lights("b")
}
case 6: {
for(new i = 1; i < 33; i++)
{
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 2)
{
set_user_health(i,100);
strip_user_weapons(i)
give_item(i,"weapon_knife")
give_item(i,"weapon_deagle")
give_item(i,"weapon_m4a1")
give_item(i,"weapon_ak47")
cs_set_user_bpammo(i,CSW_DEAGLE,90)
cs_set_user_bpammo(i,CSW_M4A1,90)
cs_set_user_bpammo(i,CSW_AK47,90)
cs_reset_user_model(i)
set_user_gnvision(i, 0)
}
if(is_user_connected(i) && is_user_alive(i) && get_user_team(i) == 1)
{
set_user_health(i,100);
strip_user_weapons(i)
give_item(i,"weapon_knife")
}
zombimod = 0;
}
set_lights("#OFF")
set_task(1.0,"hud",id+task_bilgi)
}
case 7: {
if(zombisinifi == 1){
zombisinifi = 2
zm_menu(id)
}
else if(zombisinifi == 2){
zombisinifi = 3
zm_menu(id)
}
else if(zombisinifi == 3){
zombisinifi = 1
zm_menu(id)
}
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public hud(id) {
if(zombimod == 1) {
id-= task_bilgi
set_task(1.5, "hud", id+task_bilgi);
set_hudmessage(0, 255, 0, 0.01, 0.21, 0, 6.0, 12.0)
ShowSyncHudMsg(id, SyncHudObj,"Zombi Oyunu Kapatildi^n^nZombi HP [ %i ]^nInsan HP [ %i ]",zombihp[id],insanhp[id])
}
}
public OyuncuDogunca(id) {
if (is_user_alive(id))
{
if(get_user_team(id) == 1)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
}
if(get_user_team(id) == 2)
{
Zm_SilahDokunamama = false
strip_user_weapons(id)
cs_reset_user_model(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_usp")
cs_set_user_bpammo(id, CSW_USP,90)
}
}
set_lights("#OFF")
}
public TurSonu(id) {
set_lights("#OFF")
cs_reset_user_model(id)
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_user_gnvision(id, 0)
}
public SilahDokunulmaz(weapon, id)
{
if (is_user_alive(id) && Zm_SilahDokunamama)
{
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
/*########################################################### Hayalet zombi ###########################################################*/
public fw_addtofullpack(es_handle,e,ent,host,hostflags,player,pSet)
{
if( !is_user_alive(ent) || !is_user_alive(host) || get_user_team(ent) == 1 )
return FMRES_IGNORED;
if( zombimod == 1 && zombisinifi == 2 && get_user_team(ent) == 2)
{
static color[3];
color[0] = get_pcvar_num(pRed);
color[1] = get_pcvar_num(pGreen);
color[2] = get_pcvar_num(pBlue);
set_es(es_handle,ES_RenderMode,kRenderTransAlpha);
set_es(es_handle,ES_RenderAmt,get_pcvar_num(pAlpha));
set_es(es_handle,ES_RenderFx,kRenderFxGlowShell);
set_es(es_handle,ES_RenderColor,color);
}
return FMRES_IGNORED;
}
public fw_takedamage(victim, inflictor, attacker, Float:damage, damage_type)
{
if ( (damage_type & DMG_FALL) && zombimod == 1 && get_user_team(victim) == 2 && zombisinifi == 2)
SetHamParamFloat(4, 0.0);
}
/*########################################################### Yarasa Fırlatan Zombi ###########################################################*/
public client_putinserver(id)
{
reset_value_player(id)
}
public client_disconnect(id)
{
reset_value_player(id)
}
public YeniTurcuk()
{
g_roundend = 0
for(new id = 1; id <= g_maxplayers; id++)
{
if (!is_user_connected(id)) continue;
reset_value_player(id)
}
}
public logevent_round_end()
{
g_roundend = 1
}
public EventDeath()
{
new id = read_data(2)
reset_value_player(id)
}
public zp_user_infected_post(id)
{
reset_value_player(id)
if(get_user_team(id) == 2) return;
if(zombisinifi == 3)
{
if(is_user_bot(id))
{
set_task(random_float(5.0,15.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
return
}
ColorChat(id,NORMAL,"^x04[Yarasa Firlatan Zombi]:^x01 Yarasa Firlatan Zombi Oldun.^x04 Artik Yarasa Firlatma^x01 Özelligin Var.^x04 %.1f ^x01saniyede bir ^x04G ^x01tusuna basarak firlatabilirsin.", bat_timewait)
}
}
public cmd_bat(id)
{
if(!is_user_alive(id) || !get_user_team(id) == 2 || g_roundend) return PLUGIN_CONTINUE
if(zombisinifi == 3 && !g_bat_time[id])
{
g_bat_time[id] = 1
set_task(bat_timewait,"clear_stat",id+TASK_REMOVE_STAT)
new ent = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
if(!pev_valid(ent)) return PLUGIN_HANDLED
new Float:vecAngle[3],Float:vecOrigin[3],Float:vecVelocity[3],Float:vecForward[3]
fm_get_user_startpos(id,5.0,2.0,-1.0,vecOrigin)
pev(id,pev_angles,vecAngle)
engfunc(EngFunc_MakeVectors,vecAngle)
global_get(glb_v_forward,vecForward)
velocity_by_aim(id,floatround(banchee_skull_bat_speed),vecVelocity)
set_pev(ent,pev_origin,vecOrigin)
set_pev(ent,pev_angles,vecAngle)
set_pev(ent,pev_classname,BAT_CLASSNAME)
set_pev(ent,pev_movetype,MOVETYPE_FLY)
set_pev(ent,pev_solid,SOLID_BBOX)
engfunc(EngFunc_SetSize,ent,{-20.0,-15.0,-8.0},{20.0,15.0,8.0})
engfunc(EngFunc_SetModel,ent,MODEL_BAT)
set_pev(ent,pev_animtime,get_gametime())
set_pev(ent,pev_framerate,1.0)
set_pev(ent,pev_owner,id)
set_pev(ent,pev_velocity,vecVelocity)
set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_flytime)
emit_sound(ent, CHAN_WEAPON, SOUND_FIRE, 1.0, ATTN_NORM, 0, PITCH_NORM)
g_stop[id] = ent
PlayWeaponAnimation(id, 2)
pev(id, pev_maxspeed, g_temp_speed[id])
set_pev(id,pev_maxspeed,0.1)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public fw_PlayerPreThink(id)
{
if(!is_user_alive(id)) return FMRES_IGNORED
if ( zombimod == 3 ) {
if(g_bat_stat[id])
{
new owner = g_bat_enemy[id], Float:ownerorigin[3]
pev(owner,pev_origin,ownerorigin)
static Float:vec[3]
aim_at_origin(id,ownerorigin,vec)
engfunc(EngFunc_MakeVectors, vec)
global_get(glb_v_forward, vec)
vec[0] *= banchee_skull_bat_catch_speed
vec[1] *= banchee_skull_bat_catch_speed
vec[2] = 0.0
set_pev(id,pev_velocity,vec)
}
return FMRES_IGNORED
}
if ( zombimod == 1 && zombisinifi == 2 ){
set_pev(id, pev_flTimeStepSound, 999)
}
return PLUGIN_CONTINUE
}
public EntityThink(ent)
{
if(!pev_valid(ent)) return HAM_IGNORED
new classname[32]
pev(ent,pev_classname,classname,31)
if(equal(classname,BAT_CLASSNAME))
{
static Float:origin[3];
pev(ent,pev_origin,origin);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_EXPLOSION); // TE_EXPLOSION
write_coord(floatround(origin[0])); // origin x
write_coord(floatround(origin[1])); // origin y
write_coord(floatround(origin[2])); // origin z
write_short(spr_skull); // sprites
write_byte(40); // scale in 0.1's
write_byte(30); // framerate
write_byte(14); // flags
message_end(); // message end
emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
new owner = pev(ent, pev_owner)
g_stop[owner] = 0
set_pev(owner,pev_maxspeed,g_temp_speed[owner])
engfunc(EngFunc_RemoveEntity,ent)
}
return HAM_IGNORED
}
public EntityTouchPost(ent,ptd)
{
if(!pev_valid(ent)) return HAM_IGNORED
new classname[32]
pev(ent,pev_classname,classname,31)
if(equal(classname,BAT_CLASSNAME))
{
if(!pev_valid(ptd))
{
static Float:origin[3];
pev(ent,pev_origin,origin);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_EXPLOSION); // TE_EXPLOSION
write_coord(floatround(origin[0])); // origin x
write_coord(floatround(origin[1])); // origin y
write_coord(floatround(origin[2])); // origin z
write_short(spr_skull); // sprites
write_byte(40); // scale in 0.1's
write_byte(30); // framerate
write_byte(14); // flags
message_end(); // message end
emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
new owner = pev(ent, pev_owner)
g_stop[owner] = 0
set_pev(owner,pev_maxspeed,g_temp_speed[owner])
engfunc(EngFunc_RemoveEntity,ent)
return HAM_IGNORED
}
new owner = pev(ent,pev_owner)
if(0 < ptd && ptd <= g_maxplayers && is_user_alive(ptd) && ptd != owner)
{
g_bat_enemy[ptd] = owner
set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_catch_time)
set_task(banchee_skull_bat_catch_time,"clear_stat2",ptd+TASK_REMOVE_STAT)
set_pev(ent,pev_movetype,MOVETYPE_FOLLOW)
set_pev(ent,pev_aiment,ptd)
emit_sound(owner, CHAN_VOICE, SOUND_BAT_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM)
g_bat_stat[ptd] = 1
}
}
return HAM_IGNORED
}
public clear_stat(taskid)
{
new id = ID_TASK_REMOVE_STAT
g_bat_stat[id] = 0
g_bat_time[id] = 0
ColorChat(id,NORMAL,"^x04[Yarasa Firlatan Zombi]:^x01 Ozelligin Geri Geldi.^x01Tekrardan^x04 Yarasa^x01 Firlatabilirsin.")
}
public clear_stat2(idx)
{
new id = idx-TASK_REMOVE_STAT
g_bat_enemy[id] = 0
g_bat_stat[id] = 0
}
public bot_use_skill(taskid)
{
new id = ID_BOT_USE_SKILL
if (!is_user_alive(id)) return;
cmd_bat(id)
set_task(random_float(5.0,15.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
}
fm_get_user_startpos(id,Float:forw,Float:right,Float:up,Float:vStart[])
{
new Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
pev(id, pev_origin, vOrigin)
pev(id, pev_v_angle, vAngle)
engfunc(EngFunc_MakeVectors, vAngle)
global_get(glb_v_forward, vForward)
global_get(glb_v_right, vRight)
global_get(glb_v_up, vUp)
vStart[0] = vOrigin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up
vStart[1] = vOrigin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up
vStart[2] = vOrigin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up
}
aim_at_origin(id, Float:target[3], Float:angles[3])
{
static Float:vec[3]
pev(id,pev_origin,vec)
vec[0] = target[0] - vec[0]
vec[1] = target[1] - vec[1]
vec[2] = target[2] - vec[2]
engfunc(EngFunc_VecToAngles,vec,angles)
angles[0] *= -1.0
angles[2] = 0.0
}
PlayWeaponAnimation(id, animation)
{
set_pev(id, pev_weaponanim, animation)
message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, id)
write_byte(animation)
write_byte(pev(id, pev_body))
message_end()
}
reset_value_player(id)
{
g_stop[id] = 0
g_bat_time[id] = 0
g_bat_stat[id] = 0
g_bat_enemy[id] = 0
remove_task(id+TASK_BOT_USE_SKILL)
remove_task(id+TASK_REMOVE_STAT)
}
/*########################################################### Yarasa Fırlatan Zombi Son ###########################################################*/
/*
public fog(bool:on)
{
if (on)
{
message_begin(MSG_ALL,get_user_msgid("Fog"),{0,0,0},0)
write_byte(random_num(180,244)) // Kırmızı
write_byte(1) // Yeşil
write_byte(5) // Mavi
write_byte(7) // SD
write_byte(40) // ED
write_byte(10) // D1
write_byte(0) // D2
message_end()
}
else
{
message_begin(MSG_ALL,get_user_msgid("Fog"),{0,0,0},0)
write_byte(0) // Kırmızı
write_byte(0) // Yeşil
write_byte(0) // Mavi
write_byte(0) // SD
write_byte(0) // ED
write_byte(0) // D1
write_byte(0) // D2
message_end()
}
}
*/
// Yeni Nightvision
set_user_gnvision(id, toggle)
{
message_begin(MSG_ONE, yeni_nightvision, _, id)
write_byte(toggle)
message_end()
}
Bu pluginde CT zombi oyununu başlatınca ve yarasa atan zombi sınıfı seçiliyse T de yarasa atan zombi özellikleri alıyor ( G ile yarasa atma ) ayrıca oyunu kapatınca bile CT ve T yarasa atabiliyor bunları önlemek mümkünmü ?