PHP Kod:
#include <amxmodx>
#include <reapi>
new const TAG[32] = "Special Force"
new avad
public plugin_init(){
register_plugin("No Scope", "1.1", "emirakpinar")
register_event("DeathMsg" , "eaDeath" , "a")
avad = register_cvar("ea_odul","150") // 0: Kapali - Diger sayilar odul miktari
}
public eaDeath(){
new killer = read_data(1)
new victim = read_data(2)
if (victim == killer) return;
new hs = read_data(3)
new vdistance[3], kdistance[3]
new iDistance
get_user_origin(victim, vdistance)
get_user_origin(killer, kdistance)
iDistance = get_distance(vdistance, kdistance)
new szWeapon[20]; read_data(4,szWeapon,charsmax(szWeapon));
if(equali(szWeapon,"awp") || equali(szWeapon,"g3sg1") || equali(szWeapon,"scout") || equali(szWeapon,"sg550")) {
new killern[33],victimn[33]; get_user_name(killer,killern,charsmax(killern)); get_user_name(victim,victimn,charsmax(victimn))
if (get_member(killer,m_iLastZoom) == 90) {
if(hs) client_print_color(0,0,"^4%s: ^3%s ^1adli oyuncu ^3%0.0f ^1m uzakliktan ^3%s ^1'i ^4ZOOMSUZ KAFADAN ^1vurdu. ^4[%s]", TAG, killern, float(iDistance) * 0.0254, victimn, szWeapon[0]);
else client_print_color(0,0,"^4%s: ^3%s ^1adli oyuncu ^3%0.0f ^1m uzakliktan ^3%s ^1'i ^4ZOOMSUZ ^1vurdu. ^4[%s]", TAG, killern, iDistance * 0.0254, victimn, szWeapon[0]);
new avadd = get_pcvar_num(avad)
if(avadd != 0) client_print_color(killer,killer,"^4+%i$: ^1Zoomsuz vurusunuzdan dolayi odulunuz.",avadd);rg_add_account(killer, avadd, AS_ADD)
}
}
}
PHP Kod:
#include <amxmodx>
#include <cstrike>
new const TAG[32] = "Special Force"
new bool:zoom[33]
new avad
public plugin_init(){
register_plugin("No Scope", "1.0", "emirakpinar")
register_event("DeathMsg" , "eaDeath" , "a")
avad = register_cvar("ea_odul","300") // 0: Kapali - Diger sayilar odul miktari
}
public client_PreThink(id){
if(is_user_alive(id)) {
new hedef, vucut;
get_user_aiming(id, hedef, vucut)
if(is_user_alive(hedef) && !zoom[hedef] && get_user_team(id) != get_user_team(hedef)) {
if (CS_SET_FIRST_ZOOM <= cs_get_user_zoom(id) <= CS_SET_SECOND_ZOOM) {
zoom[hedef] = true;
set_task(1.0, "sil", hedef)
}
}
}
}
public eaDeath(){
new killer = read_data(1)
new victim = read_data(2)
if (victim == killer) return;
new hs = read_data(3)
new szWeapon[20]; read_data(4,szWeapon,charsmax(szWeapon));
if(!zoom[victim]) {
if(equali(szWeapon,"awp") || equali(szWeapon,"g3sg1") || equali(szWeapon,"scout") || equali(szWeapon,"sg550")) {
new killern[33],victimn[33]; get_user_name(killer,killern,charsmax(killern)); get_user_name(victim,victimn,charsmax(victimn))
if(hs) client_print_color(0,0,"^4%s: ^3%s ^1adli oyuncu ^3%s ^1adli oyuncuyu ^4ZOOMSUZ KAFADAN ^1vurdu. ^4[%s]",TAG,killern,victimn,szWeapon[0]);
else client_print_color(0,0,"^4%s: ^3%s ^1adli oyuncu ^3%s ^1adli oyuncuyu ^4ZOOMSUZ ^1vurdu. ^4[%s]",TAG,killern,victimn,szWeapon[0]);
new avadd = get_pcvar_num(avad)
if(avadd != 0) client_print_color(killer,killer,"^4+%i$: ^1Zoomsuz vurusunuzdan dolayi odulunuz.",avadd),cs_set_user_money(killer,(cs_get_user_money(killer)+avadd))
}
}
}
public client_connect(id)
zoom[id] = false
public sil(id)
zoom[id] = false