Raised This Month: $ Target: $400
 0% 

Menu doesn't show!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 10-26-2018 , 13:46   Menu doesn't show!
Reply With Quote #1

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_MenuADMFLAG_CUSTOM1"VipMenu by SpirT");
    
RegConsoleCmd("sm_vip"vip"Comando para dizer perfil do centary / grupo da cm para comprar VIP");
}

public 
Action vip(int clientint 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 clientint args) { 
    
Menu gunmenu = new Menu(GunMenu_HandlerMENU_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(clientMENU_TIME_FOREVER); 
  
    return 
Plugin_Handled


public 
int GunMenu_Handler(Menu gunmenuMenuAction actionint param1int param2) { 
    
char choice[32]; 
    
gunmenu.GetItem(param2choicesizeof(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
    } 

__________________
SpirT is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-27-2018 , 10:14   Re: Menu doesn't show!
Reply With Quote #2

Move:
Code:
gunmenu.GetItem(param2, choice, sizeof(choice));
under
Code:
if (action == MenuAction_Select) {
scope.

Also, function must return 0 (although, it seems not required).
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is online now
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode