Raised This Month: $12 Target: $400
 3% 

View Poll Results: teste
teste 2 100.00%
teste 0 0%
Voters: 2. You may not vote on this poll

help menu plugin 4fun for steam + no steam


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stopcssurf
New Member
Join Date: Mar 2017
Location: joinville santa catarina
Old 03-18-2020 , 21:17   help menu plugin 4fun for steam + no steam
Reply With Quote #1

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^"")
stopcssurf is offline
Send a message via Skype™ to stopcssurf
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-18-2020 , 21:57   Re: help menu plugin 4fun for steam + no steam
Reply With Quote #2

Any non-Steam functionality is not supported here.
__________________
fysiks is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-18-2020 , 22:34   Re: help menu plugin 4fun for steam + no steam
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
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.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-18-2020 , 22:40   Re: help menu plugin 4fun for steam + no steam
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
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.
__________________
fysiks is offline
stopcssurf
New Member
Join Date: Mar 2017
Location: joinville santa catarina
Old 03-18-2020 , 22:45   Re: help menu plugin 4fun for steam + no steam
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
It's in the title.

could edit for my friend?
stopcssurf is offline
Send a message via Skype™ to stopcssurf
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 03-19-2020 , 09:22   Re: help menu plugin 4fun for steam + no steam
Reply With Quote #6

Quote:
Originally Posted by stopcssurf View Post
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
tarsisd2 is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 03-19-2020 , 10:07   Re: help menu plugin 4fun for steam + no steam
Reply With Quote #7

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

Last edited by Fuck For Fun; 03-19-2020 at 10:11.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Reply


Thread Tools
Display Modes

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 07:56.


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