PHP- Kodu:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <jail>
#include <colorchat>
#define PLUGIN "VipMenu"
#define VERSION "1.0"
#define AUTHOR "skc0011"
#define ADMIN_YETKI ADMIN_LEVEL_F
new bool:g_kullandim[33]
new Kanverdim [33],
g_jbpacks[33];
public plugin_natives()
{
register_native("jb_get_user_packs","native_jb_get_user_packs", 1)
register_native("jb_set_user_packs","native_jb_set_user_packs")
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vipmenu","VmenuKomut")
register_event("HLTV", "eRoundEvent", "a", "1=0", "2=0")
register_logevent("eRoundEnd",2,"1=Round_End");
register_logevent("eRoundStart", 2, "1=Round_Start");
}
public VmenuKomut(id) {
if(get_user_flags(id) & ADMIN_YETKI && !(g_kullandim[id])){
if(is_user_alive(id))
{
VipMenu(id);
}
else
{
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] Oluler Giremez.!^4")
}
}
else if(g_kullandim[id]){
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3]VipMenu'yu daha Once Kullandiniz. Lutfen Yeni Tur'u Bekleyin^4");
}
else{
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3]Vip Degilsiniz Sadece Vipler Girebilir^4");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public VipMenu(id)
{
static Item[64]
formatex(Item, charsmax(Item),"\wElite' | Gaming \r# \yVIP Menu")
new Menu = menu_create(Item, "vipmenu_gir")
formatex(Item, charsmax(Item),"\w+100 Armor \y[\rCelik Yelek\y]")
menu_additem(Menu, Item, "1")
formatex(Item, charsmax(Item),"\wCT'yi Disarmla \y[\r30 TL\y]")
menu_additem(Menu, Item, "2")
formatex(Item, charsmax(Item),"\wCT'yi Gom \y[\r30 TL\y]")
menu_additem(Menu, Item, "3")
formatex(Item, charsmax(Item),"\wCT'ye Uberslap Ver \y[\r30 TL\y]")
menu_additem(Menu, Item, "4")
formatex(Item, charsmax(Item),"\wKan Bagisla \y[\r249 \yHP \rVer , \y15 \rTL \dKazan\y]")
menu_additem(Menu, Item, "5")
menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, Menu,0)
return PLUGIN_HANDLED;
}
public vipmenu_gir(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new acces, callback, data[6], iname[64]
menu_item_getinfo(menu, item, acces, data, 5, iname, 63,callback)
new key = str_to_num(data);
switch(key)
{
case 1:
{
set_user_armor(id, 100);
g_kullandim[id] = true;
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] VIP Menu'den Armor Aldiniz.^4")
}
case 2:
{
if (g_jbpacks[id] > 30)
{
jb_set_user_packs(id,jb_get_user_packs (id) - 30)
g_kullandim[id] = true;
ctdisarm(id)
}
else
{
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^1Yeterli ^3[ ^4TL ^3] ^1' Niz Yok.")
VipMenu(id)
}
}
case 3:
{
if (g_jbpacks[id] > 30)
{
jb_set_user_packs(id,jb_get_user_packs (id) - 30)
g_kullandim[id] = true;
ctgom(id)
}
else
{
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^1Yeterli ^3[ ^4TL ^3] ^1' Niz Yok.")
VipMenu(id)
}
}
case 4:
{
if (g_jbpacks[id] > 30)
{
jb_set_user_packs(id,jb_get_user_packs (id) - 30)
ctucur(id)
g_kullandim[id] = true;
}
else
{
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^1Yeterli ^3[ ^4TL ^3] ^1' Niz Yok.")
VipMenu(id)
g_kullandim[id] = true;
}
}
case 5:
{
kanbagis(id)
g_kullandim[id] = true;
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public ctgom(id)
{
new ad[32],sznum[6]
new menu = menu_create("\wElite' | Gaming \r# \yCT Gom","ctgom_devam")
for(new i = 1;i<=get_maxplayers();i++)
if(is_user_connected(i) && get_user_team(i) == 2 && is_user_alive(i))
{
num_to_str(i,sznum,5)
get_user_name(i,ad,31)
menu_additem(menu,ad,sznum)
}
menu_display(id,menu, 0)
return PLUGIN_HANDLED
}
public ctgom_devam(id,menu,item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new ad[32],callback,access,data[6]
menu_item_getinfo(menu,item,access,data,5,ad,31,callback)
new name[32];
get_user_name(id,name,31)
new tid = str_to_num(data)
get_user_name(tid,ad,31)
server_cmd("amx_bury ^"%s^"",ad)
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^3%s ^1Nickli Mahkum ^4%s ^1Nickli Gardiyani ^3Gomdu.",name,ad)
return PLUGIN_HANDLED
}
public ctdisarm(id)
{
new ad[32],sznum[6]
new menu = menu_create("\wElite' | Gaming \r# \yCT Gom","ctdisarm_devam")
for(new i = 1;i<=get_maxplayers();i++)
if(is_user_connected(i) && get_user_team(i) == 2 && is_user_alive(i))
{
num_to_str(i,sznum,5)
get_user_name(i,ad,31)
menu_additem(menu,ad,sznum)
}
menu_display(id,menu, 0)
return PLUGIN_HANDLED
}
public ctdisarm_devam(id,menu,item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new ad[32],callback,access,data[6]
menu_item_getinfo(menu,item,access,data,5,ad,31,callback)
new name[32];
get_user_name(id,name,31)
new tid = str_to_num(data)
get_user_name(tid,ad,31)
server_cmd("amx_disarm ^"%s^"",ad)
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^3%s ^1Nickli Mahkum ^4%s ^1Nickli Gardiyani ^3Disarmladi.",name,ad)
return PLUGIN_HANDLED
}
public kanbagis(id)
{
if( !is_user_connected( id ) || !is_user_alive( id ) ) {
return PLUGIN_HANDLED;
}
if(Kanverdim[ id ] )
{
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^1Sadece ^3[ ^4Taze Kan ^3] ^1Verebilirsiniz !" );
return PLUGIN_HANDLED;
}
if( get_user_health( id ) < 250 )
{
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^1Yeteri Kadar ^3[ ^4Kaniniz ^3] ^1Yok !" );
return PLUGIN_HANDLED;
}
else
{
set_user_health( id, get_user_health( id ) - 249 );
jb_set_user_packs( id, jb_get_user_packs( id ) + 15 );
set_user_maxspeed( id, 160.0 );
Kanverdim[ id ] = true;
ColorChat(id,GREEN ,"^3[^4Elite' | Gaming^3] ^1Kan Bagisladin ^3[^4 15 TL ^3] ^1Kazandin !" );
}
return PLUGIN_HANDLED;
}
public native_jb_get_user_packs(id)
{
return g_jbpacks[id];
}
public native_jb_set_user_packs(id, ammount)
{
new id = get_param(1);
new ammount = get_param(2);
g_jbpacks[id] = ammount
return 1;
}
public ctucur(id)
{
new ad[32],sznum[6]
new menu = menu_create("\wElite' | Gaming \r# \yCT Ucur","ctucur_devam")
for(new i = 1;i<=get_maxplayers();i++)
if(is_user_connected(i) && get_user_team(i) == 2 && is_user_alive(i))
{
num_to_str(i,sznum,5)
get_user_name(i,ad,31)
menu_additem(menu,ad,sznum)
}
menu_display(id,menu, 0)
return PLUGIN_HANDLED
}
public ctucur_devam(id,menu,item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new ad[32],callback,access,data[6]
menu_item_getinfo(menu,item,access,data,5,ad,31,callback)
new name[32];
get_user_name(id,name,31)
new tid = str_to_num(data)
get_user_name(tid,ad,31)
server_cmd("amx_uberslap ^"%s^"",ad)
ColorChat(0,GREEN ,"^3[^4Elite' | Gaming^3] ^3%s ^1Nickli Mahkum ^4%s ^1Nickli Gardiyani Ucurdu.",name,ad)
return PLUGIN_HANDLED
}
public eRoundStart() {
new players[32], inum, id
get_players(players, inum)
for(new i;i<inum;i++) {
id = players[i]
g_kullandim[id] = false;
Kanverdim[id] = false;
}
}
public eRoundEvent() {
new players[32], inum, id
get_players(players, inum)
for(new i;i<inum;i++) {
id = players[i]
Kanverdim[id] = false;
g_kullandim[id] = false;
}
}
public client_connect(id)
{
g_kullandim[id] = false;
Kanverdim[id] = false;
}
public client_disconnect(id)
{
g_kullandim[id] = false;
Kanverdim[id] = false;
}
public eRoundEnd() {
new players[32], inum, id
get_players(players, inum)
for(new i;i<inum;i++) {
id = players[i]
g_kullandim[id] = false;
Kanverdim[id] = false;
}
}