Скрытый текст
#pragma semicolon 1
#include <sourcemod>
#define MOTDPANEL_TYPE_URL 2
new Handle:ContactURL;
public OnPluginStart()
{
RegConsoleCmd("say_team", Hk);
RegConsoleCmd("say", Hk);
RegConsoleCmd("motd1", motd1);
RegConsoleCmd("motd2", motd2);
RegConsoleCmd("motd3", motd3);
RegConsoleCmd("motd4", motd4);
RegConsoleCmd("motd5", motd5);
ContactURL = CreateConVar("sm_contact_url","http://funworldproject.ru/","Set this to the URL of your routing Contact site.");
}
public OnClientPostAdminCheck(client)
{
Menu(client);
}
public Action:Hk(client,argc)
{
decl String:PL[64],String:CM[32];
GetCmdArg(1,CM,sizeof(CM));
GetCmdArg(2,PL,sizeof(PL));
if(StrEqual(CM,"sm_menu",false) ||
StrEqual(CM,"menu",false))
{
Menu(client);
}
}
Menu(client)
{
new Handle:m = CreatePanel();
SetMenuTitle(m, "Меню сервера:");
DrawPanelItem(m, "Акция");
DrawPanelItem(m, "Платные услуги");
DrawPanelItem(m, "Правила"); // motd
DrawPanelItem(m, "Контакты"); // motd
DrawPanelItem(m, "Сайт"); // motd
DrawPanelItem(m, "Форум"); // motd
DrawPanelItem(m, "Бан лист"); // motd
SendPanelToClient(m, client, InfoMenuHandler, 0);
DisplayMenu(m, client, 0);
}
public InfoMenuHandler(Handle:m,MenuAction:action,client,slot)
{
if(action==MenuAction_Select)
{
switch(slot)
{
case 0:
{
admin(client);
}
case 1:
{
vip(client);
}
case 2:
{
motd_one(client);
}
case 3:
{
motd_two(client);
}
case 4:
{
motd_three(client);
}
case 5:
{
motd_four(client);
}
case 6:
{
motd_five(client);
}
}
}
}
admin(client)
{
decl String:buffer[512];
new Handle:menu = CreatePanel();
Format(buffer, sizeof(buffer), "Акция");
SetPanelTitle(menu, buffer);
Format(buffer, sizeof(buffer), "Пригласи 2 людей которые купят vip статус \n и получи vip на месяц в подарок!", client);
DrawPanelText(menu, buffer);
DrawPanelItem(menu, "<-");
SendPanelToClient(menu, client, AdminMenu_Handler, 0);
}
public AdminMenu_Handler(Handle:menu, MenuAction:action, param1, param2)
{
switch (param2)
{
case 1 : Menu(param1);
}
}
vip(client)
{
decl String:buffer[512];
new Handle:menu = CreatePanel();
Format(buffer, sizeof(buffer), "Платные услуги");
SetPanelTitle(menu, buffer);
Format(buffer, sizeof(buffer), "vip 100руб/мес \nАдминка 250руб/мес", client);
DrawPanelText(menu, buffer);
DrawPanelItem(menu, "<-");
SendPanelToClient(menu, client, VIPMenu_Handler, 0);
}
public VIPMenu_Handler(Handle:menu, MenuAction:action, param1, param2)
{
switch (param2)
{
case 1 : Menu(param1);
}
}
motd_one(client)
{
FakeClientCommand(client, "motd1");
}
public Action:motd1(client, args)
{
new String:CONURL[128];
GetConVarString(ContactURL, CONURL, sizeof(CONURL));
ShowMOTDPanel(client, "Contact", CONURL, MOTDPANEL_TYPE_URL);
return Plugin_Handled;
}
motd_two(client)
{
FakeClientCommand(client, "motd2");
}
public Action:motd2(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproje...u/kontakty.html", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
motd_three(client)
{
FakeClientCommand(client, "motd3");
}
public Action:motd3(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproject.ru", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
motd_four(client)
{
FakeClientCommand(client, "motd4");
}
public Action:motd4(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproject.ru/forum", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
motd_five(client)
{
FakeClientCommand(client, "motd5");
}
public Action:motd5(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproject.ru/sb", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
#pragma semicolon 1
#include <sourcemod>
#define MOTDPANEL_TYPE_URL 2
new Handle:ContactURL;
public OnPluginStart()
{
RegConsoleCmd("say_team", Hk);
RegConsoleCmd("say", Hk);
RegConsoleCmd("motd1", motd1);
RegConsoleCmd("motd2", motd2);
RegConsoleCmd("motd3", motd3);
RegConsoleCmd("motd4", motd4);
RegConsoleCmd("motd5", motd5);
ContactURL = CreateConVar("sm_contact_url","http://funworldproject.ru/","Set this to the URL of your routing Contact site.");
}
public OnClientPostAdminCheck(client)
{
Menu(client);
}
public Action:Hk(client,argc)
{
decl String:PL[64],String:CM[32];
GetCmdArg(1,CM,sizeof(CM));
GetCmdArg(2,PL,sizeof(PL));
if(StrEqual(CM,"sm_menu",false) ||
StrEqual(CM,"menu",false))
{
Menu(client);
}
}
Menu(client)
{
new Handle:m = CreatePanel();
SetMenuTitle(m, "Меню сервера:");
DrawPanelItem(m, "Акция");
DrawPanelItem(m, "Платные услуги");
DrawPanelItem(m, "Правила"); // motd
DrawPanelItem(m, "Контакты"); // motd
DrawPanelItem(m, "Сайт"); // motd
DrawPanelItem(m, "Форум"); // motd
DrawPanelItem(m, "Бан лист"); // motd
SendPanelToClient(m, client, InfoMenuHandler, 0);
DisplayMenu(m, client, 0);
}
public InfoMenuHandler(Handle:m,MenuAction:action,client,slot)
{
if(action==MenuAction_Select)
{
switch(slot)
{
case 0:
{
admin(client);
}
case 1:
{
vip(client);
}
case 2:
{
motd_one(client);
}
case 3:
{
motd_two(client);
}
case 4:
{
motd_three(client);
}
case 5:
{
motd_four(client);
}
case 6:
{
motd_five(client);
}
}
}
}
admin(client)
{
decl String:buffer[512];
new Handle:menu = CreatePanel();
Format(buffer, sizeof(buffer), "Акция");
SetPanelTitle(menu, buffer);
Format(buffer, sizeof(buffer), "Пригласи 2 людей которые купят vip статус \n и получи vip на месяц в подарок!", client);
DrawPanelText(menu, buffer);
DrawPanelItem(menu, "<-");
SendPanelToClient(menu, client, AdminMenu_Handler, 0);
}
public AdminMenu_Handler(Handle:menu, MenuAction:action, param1, param2)
{
switch (param2)
{
case 1 : Menu(param1);
}
}
vip(client)
{
decl String:buffer[512];
new Handle:menu = CreatePanel();
Format(buffer, sizeof(buffer), "Платные услуги");
SetPanelTitle(menu, buffer);
Format(buffer, sizeof(buffer), "vip 100руб/мес \nАдминка 250руб/мес", client);
DrawPanelText(menu, buffer);
DrawPanelItem(menu, "<-");
SendPanelToClient(menu, client, VIPMenu_Handler, 0);
}
public VIPMenu_Handler(Handle:menu, MenuAction:action, param1, param2)
{
switch (param2)
{
case 1 : Menu(param1);
}
}
motd_one(client)
{
FakeClientCommand(client, "motd1");
}
public Action:motd1(client, args)
{
new String:CONURL[128];
GetConVarString(ContactURL, CONURL, sizeof(CONURL));
ShowMOTDPanel(client, "Contact", CONURL, MOTDPANEL_TYPE_URL);
return Plugin_Handled;
}
motd_two(client)
{
FakeClientCommand(client, "motd2");
}
public Action:motd2(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproje...u/kontakty.html", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
motd_three(client)
{
FakeClientCommand(client, "motd3");
}
public Action:motd3(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproject.ru", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
motd_four(client)
{
FakeClientCommand(client, "motd4");
}
public Action:motd4(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproject.ru/forum", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
motd_five(client)
{
FakeClientCommand(client, "motd5");
}
public Action:motd5(client, args)
{
if (client > 0)
{
ShowMOTDPanel(client, "test2", "http://funworldproject.ru/sb", MOTDPANEL_TYPE_URL);
}
return Plugin_Handled;
}
Сообщение отредактировал mrstark: 22 Февраль 2015 - 7:26