plik z prezentami:
#include <amxmodx>
#include <prezenty>
#include <cstrike>
#include <fakemeta_util>
#include <ColorChat>
new const g_szPrefix[] = "Prezenty"
new const g_szWeaponNames[][] =
{
"weapon_glock18", "weapon_usp", "weapon_p228", "weapon_deagle", "weapon_fiveseven",
"weapon_elite", "weapon_m3", "weapon_xm1014", "weapon_mp5navy", "weapon_tmp",
"weapon_mac10", "weapon_p90", "weapon_ump45", "weapon_ak47", "weapon_awp",
"weapon_m4a1", "weapon_famas", "weapon_galil", "weapon_g3sg1", "weapon_m249",
"weapon_sg552", "weapon_sg550", "weapon_aug", "weapon_scout"
};
public plugin_init() {
register_plugin("Presents", "0.1", "MarWit")
register_gift("Paczka z granatami", "presentGrenadePack");
register_gift("Losowa bron", "presentRandomWeapon");
register_gift("Losowa ilosc $", "presentRadnomMoney");
register_gift("Apteczka", "presentAidKit");
register_event("HLTV", "eventRoundInit", "a", "1=0", "2=0");
}
public eventRoundInit()
{
gifts_clear_map();
set_task(5.0, "taskSpawnGift", 2368);
}
public taskSpawnGift()
{
gift_spawn();
}
public presentGrenadePack(id)
{
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
fm_give_item(id, "weapon_flashbang");
ColorChat(id, RED, "[%s]^x01 Zebrales^x04 Paczke z granatami!^x01 :D", g_szPrefix);
}
public presentRandomWeapon(id)
{
fm_give_item(id, g_szWeaponNames[random(sizeof(g_szWeaponNames))]);
ColorChat(id, RED, "[%s]^x01 Zebrales^x04 Losowa bron!^x01 :D", g_szPrefix);
}
public presentRadnomMoney(id)
{
new iMoney = random_num(2000, 16000) + cs_get_user_money(id);
iMoney = iMoney > 16000 ? 16000 : iMoney;
cs_set_user_money(id, iMoney);
ColorChat(id, RED, "[%s]^x01 Zebrales^x04 Losowa ilosc $!^x01 :D", g_szPrefix);
}
public presentAidKit(id)
{
set_pev(id, pev_health, 100.0);
ColorChat(id, RED, "[%s]^x01 Zebrales^x04 Aptecze!^x01 :D", g_szPrefix);
}
Użytkownik LaKuL edytował ten post 01.12.2015 18:54


Dodatki SourceMod












