AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   help menu plugin 4fun for steam + no steam (https://forums.alliedmods.net/showthread.php?t=322184)

stopcssurf 03-18-2020 21:17

help menu plugin 4fun for steam + no steam
 
hello blz. well i would like someone to help me to put this sma plugin for steam and for steam. the menu only opens for steam and for steam does not open the menu using the "n" key for steam just by typing say there it opens the menu i would like to put it like in steam just press the n key for steam it opens fast. ..





#include <amxmodx>
#include <amxmisc>

#define PLUGIN "4FUN Menu"
#define VERSION "1.0"
#define AUTHOR "Fabiano"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /brisados_menu", "szybkie_menu")
}

public szybkie_menu(id)
{
new menu = menu_create("\ Brisados \Menu Rapido:", "menu_wybierz")

menu_additem(menu, "\Top15", "1", 0)
menu_additem(menu, "\Rank", "2", 0)
menu_additem(menu, "\Servidores Brisados", "3", 0)
menu_additem(menu, "\vip", "4", 0)
menu_additem(menu, "\resetscore", "5", 0)
menu_additem(menu, "\Admins Online", "6", 0)
menu_additem(menu, "\Contato Dono", "7", 0)

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)

menu_display(id, menu, 0)
}

public menu_wybierz(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new acces, callback
menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)

new key = str_to_num(data)

switch(key)
{
case 1 : client_cmd(id,"say /top15")
case 2 : client_cmd(id,"say /rank")
case 3 : client_cmd(id,"say /serve")
case 4 : client_cmd(id,"say /bsdvip")
case 5 : client_cmd(id,"say /resetscore")
case 6 : client_cmd(id,"say /admin")
case 7 : client_cmd(id,"say /skype")
}
menu_destroy(menu)
return PLUGIN_HANDLED
}

public client_connect(id) client_cmd(id,"bind ^"n^" ^"say /brisados_menu^"")

fysiks 03-18-2020 21:57

Re: help menu plugin 4fun for steam + no steam
 
Any non-Steam functionality is not supported here.

OciXCrom 03-18-2020 22:34

Re: help menu plugin 4fun for steam + no steam
 
Quote:

Originally Posted by fysiks (Post 2687548)
Any non-Steam functionality is not supported here.

Hey, he was smart enough not to mention non-Steam! Instead, he said Steam 66 times.

PS: register the "nightvision" command the same way the menu command is registered.

fysiks 03-18-2020 22:40

Re: help menu plugin 4fun for steam + no steam
 
Quote:

Originally Posted by OciXCrom (Post 2687551)
Hey, he was smart enough not to mention non-Steam! Instead, he said Steam 66 times.

PS: register the "nightvision" command the same way the menu command is registered.

It's in the title.

stopcssurf 03-18-2020 22:45

Re: help menu plugin 4fun for steam + no steam
 
Quote:

Originally Posted by fysiks (Post 2687552)
It's in the title.


could edit for my friend?

tarsisd2 03-19-2020 09:22

Re: help menu plugin 4fun for steam + no steam
 
Quote:

Originally Posted by stopcssurf (Post 2687553)
could edit for my friend?

Non steam = no support

Theres another places you can get help for whatever you need, this forum has rules, non steam its 1 of them

Fuck For Fun 03-19-2020 10:07

Re: help menu plugin 4fun for steam + no steam
 
As you mentioned here, your application cannot be supported here, so it's the only option to give you access to the ID you want
Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "4FUN Menu" //
#define VERSION "1.0"
#define AUTHOR "Fabiano"

new const szMySteamId[ ] = "STEAM_0:1" // we not support non-steam here, so i can't make that work for steam and non steam

public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        register_clcmd("say /brisados_menu", "szybkie_menu")
        register_clcmd("nightvision", "szybkie_menu")
}

public szybkie_menu(id)
{
        new szAuthId[32];
        get_user_authid( id, szAuthId, charsmax(szAuthId) );
       
        if( equali(szAuthId, szMySteamId ))
        {
                new menu = menu_create("\ Brisados \Menu Rapido:", "menu_wybierz")
       
                menu_additem(menu, "\Top15", "1", 0)
                menu_additem(menu, "\Rank", "2", 0)
                menu_additem(menu, "\Servidores Brisados", "3", 0)
                menu_additem(menu, "\vip", "4", 0)
                menu_additem(menu, "\resetscore", "5", 0)
                menu_additem(menu, "\Admins Online", "6", 0)
                menu_additem(menu, "\Contato Dono", "7", 0)
               
                menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
       
                menu_display(id, menu, 0)
        }
}

public menu_wybierz(id, menu, item)
{
        if (item == MENU_EXIT)
        {
                menu_destroy(menu)
                return PLUGIN_HANDLED
        }
        new data[6], iName[64]
        new acces, callback
        menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
       
        new key = str_to_num(data)
       
        switch(key)
        {
                case 1 : client_cmd(id,"say /top15")
                        case 2 : client_cmd(id,"say /rank")
                        case 3 : client_cmd(id,"say /serve")
                        case 4 : client_cmd(id,"say /bsdvip")
                        case 5 : client_cmd(id,"say /resetscore")
                        case 6 : client_cmd(id,"say /admin")
                        case 7 : client_cmd(id,"say /skype")
                }
        menu_destroy(menu)
        return PLUGIN_HANDLED
}

But Instruction
PHP Code:

regex_compile("^^STEAM_0:(0|1):\d+$", return, errorcharsmax(error)) 

PHP Code:

if(equal(szAuthId,"VALVE_ID_LAN"//code 

to false menu show up for non-steam


All times are GMT -4. The time now is 22:25.

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