Hi guys i'm back and i need help!
I'm doing something for my cs go community and it has a menu. I compiled it and i installed on the server. When i do the command for the menu, the menu doesn't show. What can i do to it show? And how can i block the use of the command for the pistol round?
//code//
PHP Code:
#include <sourcemod>
#include <sdktools>
public Plugin myinfo =
{
name = "NoWay VIP",
author = PLUGIN_AUTHOR,
version = PLUGIN_VERSION,
description = "NoWay VIP permissões feitas por SpirT",
url = "https://steamcommunity.com/id/spirtbtx" /* Link do configurador / criador do plugin. Agradeço doações! */
};
public void OnPluginStart()
{
RegAdminCmd("sm_vipmenu", Gun_Menu, ADMFLAG_CUSTOM1, "VipMenu by SpirT");
RegConsoleCmd("sm_vip", vip, "Comando para dizer perfil do centary / grupo da cm para comprar VIP");
}
public Action vip(int client, int args)
{
PrintToChat(client, "Para comprar VIP deves:");
PrintToChat(client, "-> Entrar no grupo da Comunidade (https://steamcommunity.com/groups/NoWayGamersCM)");
PrintToChat(client, "-> Contactar um Fundador");
PrintToChat(client, "-> Comprar o VIP com skins / paypal");
PrintToChat(client, "-> Dizer que período queres como por exemplo permanente");
PrintToChat(client, "-> Usar o VIP com regras");
PrintToChat(client, "-> DIVERTE-TE!");
}
public Action Gun_Menu(int client, int args) {
Menu gunmenu = new Menu(GunMenu_Handler, MENU_ACTIONS_ALL);
gunmenu.SetTitle("VIP Menu by SpirT");
gunmenu.AddItem("AK47D", "AK47 + Deagle");
gunmenu.AddItem("M4A4D", "M4A4 + Deagle");
gunmenu.AddItem("AWPD", "AWP + Deagle");
gunmenu.ExitButton = true;
gunmenu.Display(client, MENU_TIME_FOREVER);
return Plugin_Handled;
}
public int GunMenu_Handler(Menu gunmenu, MenuAction action, int param1, int param2) {
char choice[32];
gunmenu.GetItem(param2, choice, sizeof(choice));
if (action == MenuAction_Select) {
if (StrEqual(choice, "AK47D")) {
GivePlayerItem(param1, "weapon_ak47");
GivePlayerItem(param1, "weapon_deagle");
}
else if (StrEqual(choice, "M4A4D")) {
GivePlayerItem(param1, "weapon_m4a1");
GivePlayerItem(param1, "weapon_deagle");
}
else if (StrEqual(choice, "AWPD")) {
GivePlayerItem(param1, "weapon_awp");
GivePlayerItem(param1, "weapon_deagle");
}
}
else if (action == MenuAction_End) {
delete gunmenu;
}
}
__________________