/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Jail Break: Basic Info"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define USERTASK 921
#define UPDATEDELAY 1.0
// new static reasons[][] = {
// "Uyusturucu Kullandin",
// "Tecavuzden",
// "Hirsizlik",
// "Fuhus",
// "Darp",
// "Silah Kacakciligi",
// "Sahte Mal Pazarlama",
// "Adam Yaralamadan",
// "Teror Orgutune Yardim"
// }
new userreason[33]
new rounds, hudhandler
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("TextMsg","restart_roundsnum","a","2&#Game_C"/*,"2&#Game_w"*/)
register_logevent("round_end", 2, "1=Round_End")
RegisterHam(Ham_Spawn, "player", "client_spawn", 1)
register_clcmd("say /gunayarla", "@gunayarla");
register_clcmd("transfer_miktar","@transfer_miktarx");
hudhandler = CreateHudSyncObj()
}
@gunayarla(const id) {
if(get_user_flags(id) & ADMIN_BAN) {
client_cmd(id, "messagemode transfer_miktar");
client_print_color(id, id, "^1[^3Gun^1] ^4Lutfen Gun Sayisi Giriniz ^1!");
}
else client_print_color(id, id, "^1[^3Gun^1] ^4Yetkiniz yeterli degil ^1!");
}
@transfer_miktarx(const id)
{
new szSay[300], iAmount;
read_args(szSay, charsmax(szSay));
remove_quotes(szSay);
iAmount = str_to_num(szSay);
if(!(get_user_flags(id) & ADMIN_BAN))
{
client_print_color(id, id, "^1[^3Gun^1] ^4Yetkiniz yeterli degil ^1!");
return PLUGIN_HANDLED;
}
if(iAmount < 1 || iAmount > 100)
{
client_print_color(id, id, "^1[^3Gun^1] ^4Bu deger^3 1 ^4ile^3 100 ^4arasinda olmalidir^1!");
return PLUGIN_HANDLED;
}
if(rounds == iAmount)
{
client_print_color(id, id, "^1[^3Gun^1] ^4Zaten gun %d ^1!", rounds);
return PLUGIN_HANDLED;
}
rounds = iAmount;
client_print_color(0, 0, "^1[^3Gun^1] ^4%n Adli Admin Gunu %d Yapti ^1!", id, iAmount);
return PLUGIN_HANDLED;
}
public round_end()
{
rounds ++
}
public restart_roundsnum()
{
rounds = 0
}
public client_disconnected(id)
{
userreason[id] = -1
if(task_exists(id + USERTASK))
{
remove_task(id + USERTASK)
}
}
public client_spawn(id)
{
if(task_exists(id + USERTASK))
{
remove_task(id + USERTASK)
}
if(get_user_team(id) == 1)
{
// userreason[id] = random_num(0, sizeof reasons - 1)
set_task(UPDATEDELAY, "client_jailinfo", id + USERTASK, _, _, "b")
}
}
public client_jailinfo(TASKID)
{
static id
id = TASKID - USERTASK
set_hudmessage(255, 255, 0, 0.8, 0.2, 0, 6.0, 12.0)
ShowSyncHudMsg(id, hudhandler, "Nation Clan | Gun [%d] ", rounds)
}