Raised This Month: $ Target: $400
 0% 

Solved Plugin is not responding


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NEUCOUNTRA
Junior Member
Join Date: Jul 2021
Location: Ukraine, CITY8
Old 04-07-2022 , 14:10   Plugin is not responding
Reply With Quote #1

I created my first plugin for CS:ZERO, this is simple health addition for player, but it doesn't work. I made everything as was in tutorial. How can I solve this problem?
Modules are enabled and plugin added to third-party plugins list.

Code:
#include <amxmodx>
#include <fun>

public public_init()
{
	register_plugin("health", "CNC", "0.1")
	register_clcmd("say /health", "give_health")
	register_clcmd("health", "give_health")
}

public give_health(id)
{
	set_user_health(id, get_user_health(id) + 100)
}

Last edited by NEUCOUNTRA; 04-08-2022 at 07:41.
NEUCOUNTRA is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 04-07-2022 , 22:33   Re: Plugin is not responding
Reply With Quote #2

Produce these steps and then reply

Visit https://spider.limetech.io/
Select AMX Mod X on the right panel
Paste your code
Hit compile
Click download
Upload the file to plugins folder
Go to configs/plugins.ini and write your filename, including .amxx in the end
Restart your server and test the plugin
bigdaddy424 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-07-2022 , 22:44   Re: Plugin is not responding
Reply With Quote #3

NOTE: You should ALWAYS be wary of using online compilers that aren't the official one. You should compile locally with the compiler that matches your AMX Mod X version.

I don't see anything fundamentally wrong with your code. There are a few things that you should check. In the server console, run the command "amxx list" (without quotes) via HLSW or through the server console (if using a host, you usually do this through your site's control panel). Check to verify that the plugin loaded successfully.

If it looks like it's running successfully then you'll probably need to try debugging your plugin. As a first debugging step, you can add the following line before set_user_health() to see if the function is getting called:

Code:
client_print(id, print_chat, "Health function called successfully")
Also, be sure to check your error logs in czero/addons/amxmodx/logs/. The error file starts with "error_" followed by the date.
__________________
fysiks is offline
NEUCOUNTRA
Junior Member
Join Date: Jul 2021
Location: Ukraine, CITY8
Old 04-08-2022 , 01:59   Re: Plugin is not responding
Reply With Quote #4

Quote:
Originally Posted by bigdaddy424 View Post
Produce these steps and then reply

Visit https://spider.limetech.io/
Select AMX Mod X on the right panel
Paste your code
Hit compile
Click download
Upload the file to plugins folder
Go to configs/plugins.ini and write your filename, including .amxx in the end
Restart your server and test the plugin
I did through usuall compile.exe compiler from AMX in my addons/scripting folder, it didn't work. The same with this copiler. It gives me error in console:

Code:
[ 22] unknown                 unknown     unknown           hpplugin.amxx    bad load 
( 22) Load fails: Load error 17 (invalid file format or version) (plugin "hpplugin.amxx")
I'll try to find needed compiler version.
NEUCOUNTRA is offline
NEUCOUNTRA
Junior Member
Join Date: Jul 2021
Location: Ukraine, CITY8
Old 04-08-2022 , 02:12   Re: Plugin is not responding
Reply With Quote #5

Quote:
Originally Posted by NEUCOUNTRA View Post
I did through usuall compile.exe compiler from AMX in my addons/scripting folder, it didn't work. The same with this copiler. It gives me error in console:

Code:
[ 22] unknown                 unknown     unknown           hpplugin.amxx    bad load 
( 22) Load fails: Load error 17 (invalid file format or version) (plugin "hpplugin.amxx")
I'll try to find needed compiler version.
I need to admit, that I always used my compiler for other sma files and it worked.
NEUCOUNTRA is offline
NEUCOUNTRA
Junior Member
Join Date: Jul 2021
Location: Ukraine, CITY8
Old 04-08-2022 , 02:33   Re: Plugin is not responding
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
NOTE: You should ALWAYS be wary of using online compilers that aren't the official one. You should compile locally with the compiler that matches your AMX Mod X version.

I don't see anything fundamentally wrong with your code. There are a few things that you should check. In the server console, run the command "amxx list" (without quotes) via HLSW or through the server console (if using a host, you usually do this through your site's control panel). Check to verify that the plugin loaded successfully.

If it looks like it's running successfully then you'll probably need to try debugging your plugin. As a first debugging step, you can add the following line before set_user_health() to see if the function is getting called:

Code:
client_print(id, print_chat, "Health function called successfully")
Also, be sure to check your error logs in czero/addons/amxmodx/logs/. The error file starts with "error_" followed by the date.
I solved problem with plugin running, I installed AMX 1.8.3. But it still not responding, plugin is running, but command is not working.
NEUCOUNTRA is offline
NEUCOUNTRA
Junior Member
Join Date: Jul 2021
Location: Ukraine, CITY8
Old 04-08-2022 , 02:39   Re: Plugin is not responding
Reply With Quote #7

Quote:
Originally Posted by NEUCOUNTRA View Post
I created my first plugin for CS:ZERO, this is simple health addition for player, but it doesn't work. I made everything as was in tutorial. How can I solve this problem?
Modules are enabled and plugin added to third-party plugins list.

Code:
#include <amxmodx>
#include <fun>

public public_init()
{
	register_plugin("health", "CNC", "0.1")
	register_clcmd("say /health", "give_health")
	register_clcmd("health", "give_health")
}

public give_health(id)
{
	set_user_health(id, get_user_health(id) + 100)
}
I solved my problem:

1) Installed AMX Mod 1.8.3
2) Changed
Code:
public public_init()
to
Code:
public plugin_init()
I didn't see this small mistake. Thanks to repliers.

Last edited by NEUCOUNTRA; 04-08-2022 at 02:40.
NEUCOUNTRA is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-08-2022 , 05:59   Re: Plugin is not responding
Reply With Quote #8

1) Installed AMX MODX 1.8.3

Why did you installed an unstable version of amxx you have two choices either downgrade to 182 which is stable one or upgrade to the latest amxx version.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
NEUCOUNTRA
Junior Member
Join Date: Jul 2021
Location: Ukraine, CITY8
Old 04-08-2022 , 06:08   Re: Plugin is not responding
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
1) Installed AMX MODX 1.8.3

Why did you installed an unstable version of amxx you have two choices either downgrade to 182 which is stable one or upgrade to the latest amxx version.
I did it because there were some issues with my compiler, I mean versions didn't match. So that's why I decided to move to 1.8.3
NEUCOUNTRA is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-08-2022 , 13:45   Re: Plugin is not responding
Reply With Quote #10

So where did you even find 1.8.3? That version is no longer available on the official website meaning you downloaded it from some sketchy place.

The latest dev builds are 1.9 and 1.10.
1.8.3 is an old and buggy build that no longer exists.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 15:30.


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