Code:
#include < amxmodx >
#define WIN_PERCENT 50
public plugin_init( )
{
register_plugin( "Gamble Mod", "0.0.1", "Exolent" );
register_clcmd( "say /gamble" , "CmdGamble" );
register_clcmd( "say_team /gamble", "CmdGamble" );
}
public CmdGamble( iPlayer )
{
if( random_num( 1, 100 ) <= WIN_PERCENT )
{
client_print( iPlayer, print_chat, "* You won!" );
}
else
{
client_print( iPlayer, print_chat, "* You lost!" );
}
}
__________________