PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <biohazard>
#include <cstrike>
#include <fun>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "JDM"
#define VIP_YETKI ADMIN_IMMUNITY
new bool:g_kullandim[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vipmenu","ShowVIPMenu");
register_logevent("eRoundEnd",2,"1=Round_End");
register_event("TextMsg", "eRoundRestart", "a", "2&#Game_C", "2&#Game_w");
register_logevent("eRoundStart", 2, "1=Round_Start");
}
public client_disconnect(id) {
g_kullandim[id] = false
}
public client_connect(id) {
client_cmd(id, "bind v ^"say /vipmenu^"");
g_kullandim[id] = false
}
public eRoundStart() {
new players[32], inum, id
get_players(players, inum)
for(new i;i<inum;i++) {
id = players[i]
g_kullandim[id] = false
}
}
public eRoundRestart() {
new players[32], inum, id
get_players(players, inum)
for(new i;i<inum;i++) {
id = players[i]
g_kullandim[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
}
}
public ShowVIPMenu(id) {
// Ölü oyunculara ve zombilere menü engellenmiştir...
if(!is_user_alive(id) && is_user_zombie(id)) {
return PLUGIN_CONTINUE
}
if(!g_kullandim[id]) {
if(get_user_flags(id) & VIP_YETKI) {
new menu, Menuz[512]
formatex(Menuz, charsmax(Menuz), "\d[Biohazard]: \r[VIP] \wMenu:")
menu = menu_create(Menuz, "menu_handler")
formatex(Menuz, charsmax(Menuz), "\wSCOUT + DEAGLE")
menu_additem(menu, Menuz, "1", VIP_YETKI)
formatex(Menuz, charsmax(Menuz), "\wXM1014 + USP")
menu_additem(menu, Menuz, "2", VIP_YETKI)
formatex(Menuz, charsmax(Menuz), "\wG3SG1 + DEAGLE")
menu_additem(menu, Menuz, "3", VIP_YETKI)
formatex(Menuz, charsmax(Menuz), "\wAWP + ELITES")
menu_additem(menu, Menuz, "4", VIP_YETKI)
menu_setprop(menu,MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
} else {
new name[32]
get_user_name(id, name, charsmax(name))
client_print(id, print_chat,"Sayin [%s] bu menuye sadece vipler erisebilir. Adminlik almak için skype ...",name)
return PLUGIN_CONTINUE;
}
} else {
client_print(id, print_center, "Daha Once Vip Menu Kullanildi...")
}
return PLUGIN_HANDLED
}
public menu_handler(id, menu, item) {
if(item == MENU_EXIT) {
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu,item,access,data,charsmax(data),iName,charsmax(iName),callback)
new key = str_to_num(data);
switch(key) {
case 1: {
g_kullandim[id] = true
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_scout")
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_SCOUT, 90)
cs_set_user_bpammo(id, CSW_DEAGLE, 35)
}
case 2: {
g_kullandim[id] = true
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_xm1014")
give_item(id, "weapon_usp")
cs_set_user_bpammo(id, CSW_XM1014, 32)
cs_set_user_bpammo(id, CSW_USP, 100)
}
case 3:{
g_kullandim[id] = true
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_g3sg1")
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_G3SG1, 90)
cs_set_user_bpammo(id, CSW_DEAGLE, 35)
}
case 4:{
g_kullandim[id] = true
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_awp")
give_item(id, "weapon_elite")
cs_set_user_bpammo(id, CSW_AWP, 30)
cs_set_user_bpammo(id, CSW_ELITE, 120)
}
}
return PLUGIN_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/