Raised This Month: $ Target: $400
 0% 

[Help] Is the script correct?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrJohnnie
Junior Member
Join Date: Jan 2016
Old 01-10-2016 , 16:16   [Help] Is the script correct?
Reply With Quote #1

Hey,
I recently tried to write a script (for counter strike 1.6), that would allow me to open amxmodmenu. Unfortunately, for some unknown reason my server says that "amxmodmenu" is an unknown command, so I decided to write a menu plugin, an alternative to amxmodmenu, so this is what I came up with:
Quote:
#include amxmodx

#define PLUGIN "amxmodmenu"
#define VERSION "1.0"
#define AUTHOR "JohnnieWalker"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /amenu", "server_menu" )
}

public client_authorized(id)
{
client_cmd(id, "bind ^"l^" ^"say /amenu^"")
}

public server_menu(id)
{
new i_Menu = menu_create("\wAmxModMenu", "MMENU" )
menu_additem(i_Menu, "\wShecvale Mapi", "1", 0)
menu_additem(i_Menu, "\wVoteMapis Dawyeba", "2", 0)
menu_additem(i_Menu, "\wMieci Kicki", "3", 0)
menu_additem(i_Menu, "\wMieci Bani", "4", 0)
menu_additem(i_Menu, "\wSlap/Slay", "5", 0)
menu_additem(i_Menu, "\wSheucvale Gundi", "6", 0)

menu_setprop(i_Menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, i_Menu, 0)
return PLUGIN_HANDLED
}
public MMENU(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)

return PLUGIN_HANDLED
}
new s_Data[6], s_Name[64], i_Access, i_Callback
menu_item_getinfo(menu, item, i_Access, s_Data, charsmax(s_Data), s_Name, charsmax(s_Name), i_Callback)
new i_Key = str_to_num(s_Data)
switch(i_Key)
{
case 1:
if(get_user_flags(id) & ADMIN_MENU)
{
client_cmd(id, "amx_mapmenu" )
}
else
{
server_menu(id)
}
case 2:
if(get_user_flags(id) & ADMIN_MENU)
{
client_cmd(id, "amx_votemapmenu" )
}
else
{
server_menu(id)
}
case 2:
{
client_cmd(id, "amx_votemapmenu" )
}
case 3:
if(get_user_flags(id) & ADMIN_MENU)
{
client_cmd(id, "amx_kickmenu" )
}
else
{
server_menu(id)
}
case 3:
{
client_cmd(id, "amx_kickmenu" )
}
case 4:
if(get_user_flags(id) & ADMIN_MENU)
{
client_cmd(id, "amx_banmenu" )
}
else
{
server_menu(id)
}
case 4:
{
client_cmd(id, "amx_banmenu" )
}
case 5:
if(get_user_flags(id) & ADMIN_MENU)
{
client_cmd(id, "amx_slapmenu" )
}
else
{
server_menu(id)
}
case 6:
if(get_user_flags(id) & ADMIN_MENU)
{
client_cmd(id, "amx_teammenu" )
}
else
{
server_menu(id)
}
case 6:
{
client_cmd(id, "amx_teammenu" )
}
{
client_cmd(id, "" )
}
}

menu_destroy(menu)
return PLUGIN_HANDLED

}
If you can find any problem with the script, and you're kind enough to help me, please leave a message with the corrected script.
Kind regards,
Nick.
Note**
Unfortunately, It wont compile. There's something wrong with the script. Help!
MrJohnnie is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-10-2016 , 16:30   Re: [Help] Is the script correct?
Reply With Quote #2

Instead of writing a plugin you should find out why you can't open amxmodmenu.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-10-2016 , 16:51   Re: [Help] Is the script correct?
Reply With Quote #3

I agree with Wicked. If the amxmodmenu command is not working, you should find out why because the source of this could be causing other things to not work as well. Post the full output (copy/paste) of the following command in the server (e.g. via HLSW):

meta version
meta list
amxx version
amxx list

Regarding your plugin issues, you'll need to read the errors and try and fix them. Most errors explain what is wrong and can easily be fixed.

We are here to help you, not do everything for you.

P.S. The bind command has been blocked by Valve when being sent by the server. Therefore, it will not work. Also, changing client settings is not supported here and is known as "slow hacking".
__________________

Last edited by fysiks; 01-10-2016 at 16:59.
fysiks is offline
MrJohnnie
Junior Member
Join Date: Jan 2016
Old 01-10-2016 , 17:09   Re: [Help] Is the script correct?
Reply With Quote #4

I gave up the hope of re-functioning amxmodmenu. I apologise for the direct asking of the script.
The fact thoe:
amx_banmenu, kickmenu, slapmenu and everything that you could open with amxmodmenu works It is just amxmodmenu that doesn't open and says "unknown command". I can use those by taping in amx_(menu).
So you asked these:
Meta Version:
Quote:
Metamod v1.21p37 2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:14 EET (optimized)
ifvers: 5:13
Unknown command: meta
] meta version
Metamod v1.21p37 2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:14 EET (optimi
Meta List:
Quote:
Currently running plugins:
[ 1] AMX Mod X, v1.8.3-dev, Feb 10 2014, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 2] dproto_EF, v0.9.391, 2014-06-08, by Crock, see
[ 3] mmtimer, v1.6, 2010/03/25, by Crock, see
[ 4] VoiceTranscoder, v80, 21:50:01 Nov 14 2013, by [WPMG]PRoSToTeM@ <[email protected]>, see http://www.wpmg.ru/
[ 5] Cust. Flood Fix, v1.1, 2014/12/18, by Asmodai, see http://www.dedicated-server.ru/
[ 6] FullupdatePatch, v1.2, 14/01/15, by s1lent, see http://www.aghl.ru/
[ 7] WHBlocker, v1.5.370, 2014-08-28, by s1lent, see http://www.aghl.ru/
[ 8] LocalizeBug Fix, v2.0, 20/09/14, by s1lent, see http://www.aghl.ru/
[ 9] Fun, v1.8.3-dev, Feb 10 2014, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 10] CStrike, v1.8.3-dev, Feb 10 2014, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 11] Engine, v1.8.3-dev, Feb 10 2014, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 12] Ham Sandwich, v1.8.3-dev, Feb 10 2014, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 13] CSX, v1.8.3-dev, Feb 10 2014, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 14] FakeMeta, v1.8.3-dev, Feb 10 2014, by AMX Mod X Dev Team, see http://www.amxmodx
Amxx Version:
Quote:
AMX Mod X 1.8.3-dev
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko, Felix "SniperBeamer" Geyer
Jonny "Got His Gun" Bergstrom, Lukasz "SidLuke" Wlasinski
Christian "Basic-Master" Hammacher, Borja "faluco" Ferrer
Scott "DS" Ehlert
Compiled: Feb 10 2014, 00:20:58
URL:http://www.amxmodx.org/
Core
Amxx List:
Quote:
AMX Mod X 1.8.3-dev
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko, Felix "SniperBeamer" Geyer
Jonny "Got His Gun" Bergstrom, Lukasz "SidLuke" Wlasinski
Christian "Basic-Master" Hammacher, Borja "faluco" Ferrer
Scott "DS" Ehlert
Compiled: Feb 10 2014, 00:20:58
URL:http://www.amxmodx.org/
Core m
Thanks for trying to help me, I appreciate that

Last edited by MrJohnnie; 01-10-2016 at 17:12.
MrJohnnie is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 01-11-2016 , 06:39   Re: [Help] Is the script correct?
Reply With Quote #5

Code:
[  2] dproto_EF, v0.9.391, 2014-06-08, by Crock, see
fail...
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-11-2016 , 07:18   Re: [Help] Is the script correct?
Reply With Quote #6

Quote:
Originally Posted by Depresie View Post
Code:
[  2] dproto_EF, v0.9.391, 2014-06-08, by Crock, see
fail...
Depresie found some(all) yours problem(s).

See also:
  1. Some help with AlliedModdersForum
  2. Valve's Policy of Truth: Valve to crack down on servers that fake info to players
  3. [HELP] Problem in redirect plugin!!
  4. Slow Hacking
  5. Why slowhacking, etc, is bad.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 01-11-2016 at 07:43. Reason: spelling fix
addons_zz is offline
MrJohnnie
Junior Member
Join Date: Jan 2016
Old 01-11-2016 , 08:15   Re: [Help] Is the script correct?
Reply With Quote #7

I don't get it. Can you tell my problems? Couldn't analyze the last post. What did I do wrong?
MrJohnnie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-11-2016 , 08:59   Re: [Help] Is the script correct?
Reply With Quote #8

Quote:
Originally Posted by MrJohnnie View Post
I don't get it. Can you tell my problems? Couldn't analyze the last post. What did I do wrong?
If you cant find by yourself, here it goes more straight:
  1. Rules
  2. Final word about No-Steam!


Quote:
Originally Posted by AlliedModders Rules
  • You do not need to own the game on Steam to participate in these forums. However, publicizing violations of the Digital Millennium Copyright Act (DMCA) will result in a ban. This includes...
    • Linking to sites that are targeted toward cracking Steam or circumventing its copyright protection.
    • Asking for support against cracked or illegitimate versions of Steam, either directly or via evidence in your request.
    • Mentioning that you, or promoting the act of, cracking Steam or circumventing its copyright protection.
    • Promoting the running of "no-steam" servers, or publicizing that you run such servers.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 01-11-2016 at 09:18. Reason: better information
addons_zz is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 01-11-2016 , 09:10   Re: [Help] Is the script correct?
Reply With Quote #9

First check source of amxmodmenu,after that recompile and put it on server. If problem is still here then deactivate all aditional plugins,maybe some of them returns handled on it, i dont know.
siriusmd99 is offline
Old 01-31-2016, 05:51
Depresie
This message has been deleted by Depresie. Reason: Edge is playing tricks on me
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 09:34.


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