PHP- Kodu:
#include <amxmodx>
#include <hamsandwich>
#include <colorchat>
#include <cstrike>
new bool:ElBasiKill[33] = false;
new g_toplamo
public plugin_init() {
register_plugin("Mahkum Menusu","1.0","Nemesis")
register_logevent("EventRoundStart", 2,"1=Round_Start")
RegisterHam(Ham_Killed, "player", "oldugunde")
g_toplamo = get_maxplayers()
}
public EventRoundStart() {
for(new victim=0;victim<33;victim++) {
if(ElBasiKill[victim] == true) {
ElBasiKill[victim] = false;
client_cmd(victim,"kill")
new vname[65];
get_user_name(victim,vname,64)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s: ^1Kotu Sans Nedeniyle Hayatini Kaybetti !",vname)
}
}
}
public oldugunde(victim, attacker, shouldgib) {
if(cs_get_user_team(victim) == CS_TEAM_T)
{
sont(victim)
}
}
public sont(id) {
if(cs_get_user_team(id) == CS_TEAM_T)
{
new ts[32], tsnum
for (new id=1; id <= g_toplamo; id++)
{
if (!is_user_connected(id) || !is_user_alive(id))
{
continue
}
if (cs_get_user_team(id) == CS_TEAM_T)
{
ts[tsnum++] = id
}
}
if (tsnum == 1)
{
top(id)
}
}
}
public top(id) {
if( !is_user_alive(id) ) return PLUGIN_HANDLED
new menu = menu_create("\rBirini Sec ! ", "menu_handler")
menu_additem(menu, "Sansimi Denemek Istiyorum", "1", 0);
menu_additem(menu, "VS Atmak Istiyorum", "2", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
return PLUGIN_CONTINUE
}
public menu_handler(i, 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,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1: {
FuncSans(i);
}
case 2: {
new sonisim[65];
get_user_name(i,sonisim,64)
client_cmd(i,"say /vs")
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s: ^4VS ^1Atmayi Secti !",sonisim)
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public FuncSans(i) {
new secenek;
secenek = random_num(1,7)
set_hudmessage(255, 255, 255, 0.3, 0.31, 0, 6.0, 5.0,_,_,-1)
new name[65];
get_user_name(i,name,64)
switch(secenek) {
case 1: {
jb_set_user_packs(i,jb_get_user_packs(i) + 25)
client_cmd(i,"say /vs")
show_hudmessage(0,"%s Adli Mahkumun Sansina: 25 JB + VS Cikti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^425 JB + VS ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^425 JB + VS ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^425 JB + VS ^1Kazandi !",name)
}
case 2: {
jb_set_user_packs(i,jb_get_user_packs(i) + 50)
client_cmd(i,"say /vs")
show_hudmessage(0,"%s Adli Mahkumun Sansina: 50 JB + VS Cikti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^450 JB + VS ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^450 JB + VS ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^450 JB + VS ^1Kazandi !",name)
}
case 3: {
jb_set_user_packs(i,jb_get_user_packs(i) + 75)
client_cmd(i,"say /vs")
show_hudmessage(0,"%s Adli Mahkumun Sansina: 75 JB + VS Cikti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^475 JB + VS ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^475 JB + VS ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^475 JB + VS ^1Kazandi !",name)
}
case 4: {
client_cmd(i,"kill")
show_hudmessage(0,"%s Adli Mahkumun Sansina: Olum Cikti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4Hayatini ^1Kaybetti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4Hayatini ^1Kaybetti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4Hayatini ^1Kaybetti !",name)
}
case 5: {
ElBasiKill[i] = true;
client_cmd(i,"say /vs")
show_hudmessage(0,"%s Adli Mahkumun Sansina: VS + Gelecek El Olum Cikti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4VS Hakki ^1Karsiliginda ^3Gelecek El Olum ^1Cezasi Aldi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4VS Hakki ^1Karsiliginda ^3Gelecek El Olum ^1Cezasi Aldi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4VS Hakki ^1Karsiliginda ^3Gelecek El Olum ^1Cezasi Aldi !",name)
}
case 6: {
give_item(i,"weapon_m4a1")
give_item(i,"weapon_ak47")
set_user_health(i,5000)
new playersct[32],inumct;
get_players(playersct,inumct,"ae","CT")
for(new cts=0;cts<33;cts++) {
if(get_user_team(playersct[cts]) == 2) {
set_user_health(playersct[cts],100)
new Float:xorigin[3]
pev(playersct[cts],pev_origin,xorigin)
xorigin[2] -= 36.0
set_pev(playersct[cts],pev_origin, xorigin)
}
}
show_hudmessage(0,"%s Adli Mahkumun Sansina: CT Infaz Cikti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4CT'Ye Infaz Hakki ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4CT'Ye Infaz Hakki ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4CT'Ye Infaz Hakki ^1Kazandi !",name)
}
case 7: {
client_cmd(i,"say /vs")
show_hudmessage(0,"%s Adli Mahkumun Sansina: VS Cikti !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4VS Hakki ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4VS Hakki ^1Kazandi !",name)
ColorChat(0,GREEN,"^4[JB] ^1Mahkum ^3%s ^1Sansini Denedi ve ^4VS Hakki ^1Kazandi !",name)
}
}
}
//////////////