AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Is the script correct? (https://forums.alliedmods.net/showthread.php?t=277529)

MrJohnnie 01-10-2016 16:16

[Help] Is the script correct?
 
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!

wickedd 01-10-2016 16:30

Re: [Help] Is the script correct?
 
Instead of writing a plugin you should find out why you can't open amxmodmenu.

fysiks 01-10-2016 16:51

Re: [Help] Is the script correct?
 
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".

MrJohnnie 01-10-2016 17:09

Re: [Help] Is the script correct?
 
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 :)

Depresie 01-11-2016 06:39

Re: [Help] Is the script correct?
 
Code:

[  2] dproto_EF, v0.9.391, 2014-06-08, by Crock, see
fail...

addons_zz 01-11-2016 07:18

Re: [Help] Is the script correct?
 
Quote:

Originally Posted by Depresie (Post 2382172)
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.

MrJohnnie 01-11-2016 08:15

Re: [Help] Is the script correct?
 
I don't get it. Can you tell my problems? Couldn't analyze the last post. What did I do wrong?

addons_zz 01-11-2016 08:59

Re: [Help] Is the script correct?
 
Quote:

Originally Posted by MrJohnnie (Post 2382191)
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!
http://i.imgur.com/2pYyYBk.png

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.


siriusmd99 01-11-2016 09:10

Re: [Help] Is the script correct?
 
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.


All times are GMT -4. The time now is 09:34.

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