Chodzi o to , ze prezenty nie maja sie pojawiac losowo na mapie , tylko jak gracz zabije gracza to w miejscu trupa ma pojawic sie prezent i losowo dawal jakis prezent z tych ktore sa w tym pluginie.
#include <amxmodx>
#include <amxmisc>register_gift("M4A1", "Prezent_M4A1");
#include <cstrike>
#include <fun>
#include <prezenty>
#define PLUGIN "Lajtowy - prezenty"
#define VERSION "1.1"
#define AUTHOR "R3X"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_gift("M4A1", "Prezent_M4A1");
register_gift("AWP", "Prezent_AWP");
register_gift("Deagle", "Prezent_Deagle");
register_gift("M3", "Prezent_M3");
register_gift("XM1014", "Prezent_XM1014");
register_gift("Glock", "Prezent_Glock");
register_gift("Usp", "Prezent_Usp");
register_gift("Full Equipment", "Prezent_Full");
register_gift("Kasa", "Prezent_Kasa");
//Na poczatk rundy
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 Prezent_M4A1(id)
{
give_item(id, "weapon_m4a1");
}
public Prezent_AWP(id)
{
give_item(id, "weapon_awp");
}
public Prezent_Deagle(id)
{
give_item(id, "weapon_deagle");
}
public Prezent_M3(id)
{
give_item(id, "weapon_m3");
}
public Prezent_XM1014(id)
{
give_item(id, "weapon_xm1014");
}
public Prezent_Glock(id)
{
give_item(id, "weapon_glock18");
}
public Prezent_Usp(id)
{
give_item(id, "weapon_usp");
}
public Prezent_Full(id)
{
give_item(id, "weapon_awp");
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_smokegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
cs_set_user_defuse(id, 1);
cs_set_user_nvg(id, 1);
set_user_health(id, 130);
}
public Prezent_Kasa(id)
{
cs_set_user_money(id, cs_get_user_money(id) + random_num(1000, 16000));
}
pozdrawiam 

Dodatki SourceMod












