PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
// RocketMenu
#define PLUGIN "Rocket"
#define VERSION "1.0"
#define AUTHOR "Bilbaz"
new kullanim = true, countdown
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /rmenu", "rocket")
register_clcmd("say /rocketmenu", "rocket")
register_clcmd("say /rocket", "rocket")
register_clcmd("say /roket", "rocket")
register_logevent("elbasi", 2, "1=Round_Start")
}
public rocket(id)
{
new szMapName[ 64 ];
get_mapname( szMapName, 63 );
if( contain( szMapName, "jail_" ) != -1 ){
if (get_user_team(id) == 2 && is_user_alive(id))
{
new menu = menu_create("\yCT \yRocket \yMenusu", "rocketmenu")
menu_additem(menu, "\r[10] \y Sonra Rocket AT", "1", 0);
menu_additem(menu, "\r[15] \y Sonra Rocket AT", "2", 0);
menu_additem(menu, "\r[20] \y Sonra Rocket AT", "3", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
else
{
client_printc(id, "!g[Rocket]:!tBu menuyu Sadece !gCT!t'ler Acabilir")
}
}
else
{
client_printc(id, "!g[Rocket]:!tBu menu sadece !gJail_!t maplarda acilir.")
}
}
public rocketmenu(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,5, iName, 63, callback);
new key = str_to_num(data);
new adminismi[32]
get_user_name(id,adminismi,31)
switch(key)
{
case 1: {
if(kullanim){
set_task(1.0,"rocketz",0);
kullanim = false
countdown = 10
client_printc(0, "!g[CT]!t %s !nROKETLERI FIRLATTI",adminismi)
client_printc(0, "!g[Rocket]:!t 10 !nSaniye Sonra Rocket Atilacak.")
client_printc(0, "!g[Rocket]:!t Adminler Adminliklerinden Ciksin !!!")
}
else
{
client_printc(id, "!g[Rocket]:!t Saten Rocket atiliyor !")
}
}
case 2: {
if(kullanim){
kullanim = false
countdown = 15
set_task(1.0,"rocketz",0);
client_printc(0, "!g[CT]!t %s !nROKETLERI FIRLATTI",adminismi)
client_printc(0, "!g[Rocket]:!t 15 !nSaniye Sonra Rocket Atilacak.")
client_printc(0, "!g[Rocket]:!t Adminler Adminliklerinden Ciksin !!!")
}
else
{
client_printc(id, "!g[Rocket]:!t Saten Rocket atiliyor !")
}
}
case 3: {
if(kullanim){
kullanim = false
countdown = 20
set_task(1.0,"rocketz",0);
client_printc(0, "!g[CT]!t %s !nROKETLERI FIRLATTI",adminismi)
client_printc(0, "!g[Rocket]:!t 20 !nSaniye Sonra Rocket Atilacak.")
client_printc(0, "!g[Rocket]:!t Adminler Adminliklerinden Ciksin !!!")
}
else
{
client_printc(id, "!g[Rocket]:!t Saten Rocket atiliyor !")
}
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public rocketz()
{
client_printc(0, "!g[Rocket]:!t %d !nSaniye Sonra Roket Atilacak.",countdown)
client_print(0,print_center,"%d Saniye Sonra Roket Atilicak...",countdown)
countdown--
if(countdown >= 1)
set_task(1.0,"rocketz",0)
else
{
kullanim = true
rocketyolla()
}
}
public rocketyolla(){
server_cmd("amx_rocket @T")
client_print(0,print_center,"aHa Gok Delinigggggg !!!!!!!!!!")
}
stock client_printc(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sarı)
replace_all(msg, 190, "!g", "^x04"); // Yeşil Renk
replace_all(msg, 190, "!t", "^x03"); // Takım Renk( CT mavi , T kırmızı )
if (id) players[0] = id; else get_players(players, count, "ch");
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}