PHP Kod:
#include <amxmodx>
#include <cstrike>
new bool:zoom[33]
public plugin_init(){
register_plugin("No Scope", "1.0", "emirakpinar")
register_event("DeathMsg" , "eaDeath" , "a")
}
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) renkli_yazi(0,"!tBIG GAMERZ - 95.173.173.9: !n%s !gadli oyuncu !n%s !gadli oyuncuyu !tZOOMSUZ KAFADAN !gvurdu. !t[%s]",killern,victimn,szWeapon[0]);
else renkli_yazi(0,"!tBIG GAMERZ - 95.173.173.9: !n%s !gadli oyuncu !n%s !gadli oyuncuyu !tZOOMSUZ !gvurdu. !t[%s]",killern,victimn,szWeapon[0]);
}
}
}
public client_connect(id)
zoom[id] = false
public sil(id)
zoom[id] = false
#if AMXX_VERSION_NUM < 183
stock renkli_yazi(const id, const input[], any:...){
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!n", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
if (id) players[0] = id; else get_players(players, count, "ch");{
for (new i = 0; i < count; i++){
if (is_user_connected(players[i])){
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]),write_string(msg),message_end();
}
}
}
}
#else
stock renkli_yazi(const id, const input[], any:...){
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^x01");
replace_all(msg, 190, "!n", "^x04");
replace_all(msg, 190, "!t", "^x03");
client_print_color(id, id, msg);
}
#endif