Learning scripting in amx mod x but I can't find the functions of "register_event"
Well, first of all I will try to clarify my situation and at the end of the post I will explain what am I asking.:up:
I was looking for hours the functions of register_event but i can't find in anywhere in the wiki or in documentations of amx mod X in this 2 sites. http://www.amxmodx.org/doc/ https://www.amxmodx.org/api/amxmodx/register_event You can see each flag, an easy and simple explanation and the important thing: what each one of them do. (but not in events and functions. The site just explain what are both but they aren't showing all the events and functions that both have) What I found where it show all the events and also explain what each event does is in here and it explain them what each one do clearly in a simple way what they do. https://wiki.alliedmods.net/Half-Life_1_Game_Events But in case of the functions :nono: I can't find them in anywhere (a list) like the most common "hooked_death" (Such as the list in the second link I shared above about the events) The problem is trying to figure out what exactly they do! Like test the plugin in the server or experimenting when i compile the source code and test it. Specifically to learn to script in this way at some extent is frustrating to me, even watching samples in tutorials thread, in simple codes it's boring to me. By now i'm learning to script in amxmodx through plugins because to me is a fun way to learn.:) So I'm asking if there are in somewhere a list of the functions that register_event has? :?: My best Regards:wink: and sorry for my bad english :lol: |
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
Look in csx.inc, hamsandwich.inc, fun.inc, cstrike.inc and other .inc files to see what you can do. They are located in addons/amxmodx/scripting/include/
Especially look for the keyword "forward", the documentation is all there. Do NOT use the amxx api web references as they are outdated, instead use your local include files to search through what you need. You already linked twice where all the register_event functions are at, and that page also explains the parameters you can check for the event. "hooked_death" can be achieved with register_event MsgDeath, csx.inc's client_death and client_damage forwards, hamsandwich.inc's ham_playerkilled and ham_takedamage hooks, and im pretty sure there are other forwards you can use to detect a player's death. |
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
write "meta game" in server console with metamod running
|
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
Quote:
In the two first sites it shows the flags and what of them do. For example: register_event ( const event[], const function[], const flags[], [ cond=[], ... ] ) https://i.imgur.com/OPD0JGp.png You can see above that is explaining what is a "flag". It show each one of them, and what they do as the "a" , "b", "c"..... etc. register_event ( const event[], const function[], const flags[], [ cond=[], ... ] ) https://i.imgur.com/MZ43Pc1.png above it just say: "Name of event that should be hooked" But the list of each one of them and what they do? ... thanks I found them here register_event ( const event[], const function[], const flags[], [ cond=[], ... ] ) https://i.imgur.com/hYE2adU.png Same thing happens here. It just say Name of callback function But the list of each one of them and what they do? Quote:
https://i.imgur.com/7yvu2VP.png Where are all the function that you are saying thay all at there? :roll: Again sorry for my bad english :lol: |
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
you are supposed to name the function yourself that will be called with the event
|
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
you must give the name of the callback function
https://en.wikipedia.org/wiki/Callba...er_programming) hooking player death with hamsandwich: https://forums.alliedmods.net/showthread.php?t=113356 |
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
Quote:
In simple words if I want to make a plugin in which it have a timer in a corner and which it does is show you a hud such as in a speedrunning, it logs how long time you stayed alived in a deathmatch game just after you have died. So you can keep in track how long you stayed alive in each time in the game after you died. Then at the end of the game you will see what was the max time you stayed alive. So... How do I find the codes I need (or the functions) to make a plugin like this?, cuz there's no something such as a list such as events like this |
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
This looks like an XY problem. If you want help with implementing a particular function or a plugin, simply create a thread asking about that specific functionality or plugin. Don't ask an extremely vague question like "what are all the game events".
Create a thread for your specific issue and you'll get much better, targeted responses. |
Re: Learning scripting in amx mod x but I can't find the functions of "register_event
that depends of your logic. you can't find a specific code that works exactly how you want.
better write it by yourself and think what you need to achieve. if you want to create a thread about your plugin just do it and post the code and ask for solutions. amxx is not documented as good as you think. you need to know pawn, amx mod x libraries and basics of programming to achieve what you said in your last post. |
| All times are GMT -4. The time now is 10:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.