Usually used when hooking an event.. using that function can return useful parameters passed on each event, but as far as I know it only returns integer types (like short or byte)
An example of the data for the 'CurWeapon' Event:
(not actual Small C code, just example of the data)
Code:
Name = CurWeapon
ID = 68
Size = 3
Arg1 = BYTE : isActive
Arg2 = BYTE : weapon id
Arg3 = BYTE : ammo
so, if you hook that event, you can do something like:
Code:
#include <amxmodx>
public plugin_init()
{
// Hook the Event to call our function for each player (flag "b")
// our function only gets called if first arg is 1 (isActive: 1)
// if our weapon was active, then it will meet the "1=1" condition
// and call our function
register_event( "CurWeapon", "event_weapon", "b", "1=1" )
}
public event_weapon()
{
// we dont need to use first argument in this function (unless u want to)
// since we already used first argument as a condition when registering the event
new iWeaponID = read_data( 2 )
new iAmmo = read_data( 3 )
// some more code...
return PLUGIN_CONTINUE
}
I have appended an old list of events and parameters for CS...