PHP- Kodu:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <cstrike>
#define PLUGIN "Bomba Model"
#define VERSION "0.00015"
#define AUTHOR "ViTaLiTy"
new bombamodel[33]
new cvar_fiyat
public plugin_init() {
register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
register_clcmd("say /angrybirds","bomba");
cvar_fiyat = register_cvar("angry_bomba_tutar", "16000")
set_task(100.0, "angrybirds", 0, _, _, "b")
}
public event_round_start(id)
{
bombamodel[id] = 0
for(new id = 1; id < 33; id++)
{
if(is_user_connected(id) && is_user_alive(id) && get_user_team(id) == 2)
{
strip_user_weapons(id)
give_item(id,"weapon_hegrenade")
}
if(is_user_connected(id) && is_user_alive(id) && get_user_team(id) == 1)
{
strip_user_weapons(id)
give_item(id,"weapon_hegrenade")
}
}
}
public plugin_precache() {
precache_model("models/v_hegrenadevital.mdl")
}
public bomba(id) {
if(!is_user_alive(id)){
client_print(id,print_chat,"[ ~ %s ~ ] Esyayi Kullanabilmeniz Icin Hayatta Olmaniz Gerekiyor",AUTHOR)
return PLUGIN_HANDLED
}
new para = get_pcvar_num(cvar_fiyat)
new para2 = cs_get_user_money(id)
if( para2 >= para){
cs_set_user_money(id, para2 - para)
bombamodel[id] = 1
new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo)
if ( Weapon == CSW_HEGRENADE ){
entity_set_string(id, EV_SZ_viewmodel, "models/v_hegrenadevital.mdl")
}
client_print(id,print_chat,"[ ~ %s ~ ] Esya Basariyla Satin Alindi.",AUTHOR)
return PLUGIN_HANDLED
}
else
{
client_print(id,print_chat,"[ ~ %s ~ ] Esyayi Almak Icin Yeterli Paraniz Yok. Gereken Tutar: %d",AUTHOR,get_pcvar_num(cvar_fiyat))
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public angrybirds(){
client_print(0,print_chat,"[ ~ %s ~ ] Bedava Bomba Almak Icin /angrybirds Yaziniz ..!",AUTHOR)
}
buda paralısı