Amx mod x scripting needs more practical event fuctions. There are certain scripting situations register_event doesn't fit. For example in and
or
register_event and other event fuctions do not go well and coding that needs multi-events to be used within the same code to keep game play balanced don't work together at all. register_event and register_logevent fuction requires the "const function" field and is not practical when needing it in if, else if and other conditions. A get_event or check_event would be very useful.
Example: Something like this
PHP Code:
{
//your infinite loop code here
{
if (get_user_heath(id) < 31)
{
if (check_event("BuildSt")) //if user is bulding a sentry run the
//following block of code.
{
//the code
}
if (!check_event("BuildSt")) //if user is not building a sentry run
//this code
{
//the alternate code
}
}
if (get_user_health(id) > 31)
{
//code
}
}
}
An extended even functions inc would be greatly appreciated if someone here could make one.
Benifites:
Being able to have 2 and more opposing events in a single feature of your plugin.
Not have having to execute 2 separate sets of code blocks for different events.
being able to determine events internally in a set of code instead of executing an external separate set of code.
__________________