set_cvar_num on plugin hook
Well, I'm fresh and got no clue these things yet, where do I find all the hamsandwich events, documentation? Like ham_spawn and others?
Well my coding related issue is that I want to set some server cvars via my plugin as soon as the plugin loads, anyhelp and advises are appreciated! set_cvar_num |
Re: set_cvar_num on plugin hook
|
Re: set_cvar_num on plugin hook
Quote:
Someone help me, I have no clue on how to setup arguments for these events, tried a bunch of different things but I really dont know what it wants from me, PHP Code:
Code:
// C:\hlds\cstrike\addons\amxmodx\scripting\huanmod.sma(19) : error 088: number of arguments does not match definition |
Re: set_cvar_num on plugin hook
Quote:
Quote:
Quote:
|
Re: set_cvar_num on plugin hook
Quote:
As for the sentence with mapchanging, its all about setting the cvars(example, sv_airacceleration), if theres no way to do it on load via an event I'll have to try something that happens every round. Reading the forward params tells me a lot but I have no idea on how to get the idattacker and the others, I very green on this, its my absolute first real project and a snippet would be lovely, when it comes to what I'm trying to do, when a player is attacked by a gun(any gun), holds shift or holds duck, hes speed decreases, increases or whatever, I might even have the wrong impression of how they're supposed to be working. Just to make it clear, I allready wrote all the code for the actions, it gives no errors and should work just as I intended, I'm just trying to make them execute when player is shot, walks or ducks. I've fixed the PHP Code:
PHP Code:
PHP Code:
Code:
// C:\hlds\cstrike\addons\amxmodx\scripting\huanmod.sma(19) : error 088: number |
Re: set_cvar_num on plugin hook
The error is written in english.
Also, if you search for that error you would probably find about 10000000000 matches. |
Re: set_cvar_num on plugin hook
Quote:
|
Re: set_cvar_num on plugin hook
plugin_init() is run when the plugin is initiated. Cvars should be set in plugin_cfg().
If you are having issues using Ham forwards, you should look at existing working plugins that use the functions you are interested in. You are using RegisterHam() incorrectly. If you look at the include for Ham (hamsandwich.inc), you will see that the second argument is the EntityClass, not the function you want called (which is called the "callback"). |
Re: set_cvar_num on plugin hook
Look, you have been told to look in Ham includes files.
You see you have error using RegisterHam() and compiler tells you the number of arguments doesn't match definition. So, first thing you should do is : how this function RegisterHam should be defined. You check hamsandwich.inc and you see : Code:
56 /** |
Re: set_cvar_num on plugin hook
fysiks, Thank you! Just what I was looking for, still struggling with some of it but nothing I wont resolve myself.
Arkshine, "Is Work! hurray", I've been using the docs on the Amxmodx site, figured out the either are outdated or I might just simply be reading them incorrect, english isnt my first language but this you all might already have figured out. Thanks for the help! |
| All times are GMT -4. The time now is 05:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.