PHP Code:
public Action CommandRoulette( int client, int args )
{
if( client < 1 || client > MaxClients )
{
return Plugin_Handled;
}
if( args < 2 )
{
ReplyToCommand(client, "[SM] Usage: sm_ruleta <culoare_rgb> <suma>");
return Plugin_Handled;
}
char argsCmd[16];
GetCmdArg( 1, argsCmd, sizeof( argsCmd ));
char color[3][8];
ExplodeString( argsCmd, ",", color, sizeof( color ), sizeof( color[] ));
int color_rgb[3];
color_rgba[0] = StringToInt( color[0] ); // r
color_rgba[1] = StringToInt( color[1] ); // g
color_rgba[2] = StringToInt( color[2] ); // b
GetCmdArg( 2, argsCmd, sizeof( argsCmd ));
int money = StringToInt( argsCmd ); // money
// give them the color here << int color_rgb
// drain they money here << int money
SpinCredits( client ); // i suppost this is Spend.. never spin a money.. mama gonna upset.
return Plugin_Handled;
}
__________________