PHP Code:
#include <amxmodx>
new g_Test;
public plugin_init( )
{
register_plugin( "Bleh", "Blah", "Bluh" );
register_clcmd( "say /test", "test" );
}
public test( )
{
g_Test = random_num( 1, 100 );
client_print( 0, print_chat, "g_Test was randomized: %d", g_Test );
reset( g_Test );
client_print( 0, print_chat, "Cleared. g_Test is now: %d", g_Test );
}
reset( &iVar )
iVar = 0;
Following output:
Code:
g_Test was randomized: 34
Cleared. g_Test is now: 0
Nextra : /test
Resetting globals byref is possible.
__________________