I did that now, after I do the spray appears to me 1/50 of
Tell me if it's okay, when a player finishes the 50/50 then it will be registered in chat it is finished and it will not keep him.
300 straight passes spray.
Thanks for the help
Code:
new Sprayed[ 33 ], Achievements[ 33 ];
public SprayMission( client )
{
static szMenu[ 64 ], iMenu;
formatex( szMenu, charsmax( szMenu ), "\ySprayMission \wMenu");
iMenu = menu_create( szMenu, "CmdSprayHandler" );
formatex( szMenu, charsmax(szMenu), "\wSpray \w(\d%d\w/\y50\w)", Sprayed[ client ] );
menu_additem( iMenu, szMenu, "0" );
formatex( szMenu, charsmax(szMenu), "\wSpray \w(\d%d\w/\y300\w)", Sprayed[ client ] );
menu_additem( iMenu, szMenu, "1" );
formatex( szMenu, charsmax(szMenu), "\wSpray \w(\d%d\w/\y1000\w)", Sprayed[ client ] );
menu_additem( iMenu, szMenu, "2" );
menu_display( client, iMenu );
return PLUGIN_HANDLED;
}
public FwdSpray( )
{
new id = read_data(2 );
if ( !is_user_alive( id ) ) return PLUGIN_HANDLED;
if ( Sprayed[ id ] >= 300 ) return PLUGIN_HANDLED;
Sprayed[ id ] += 1;
if ( Sprayed[ id ] == 50 )
{
LevelUp( id );
Achievements[ id ] += 1;
ColorChat( 0, GREEN, "[System] ^3%s^1 has earned the^4 Level 1 Spray^1 Achievement! (^4 %d/17^1 Achievements )", szName( id ), Achievements[ id ] );
//set_user_cash( id, get_user_cash( id ) + 500 );
}
if ( Sprayed[ id ] == 300 )
{
Achievements[ id ] += 1;
ColorChat( 0, GREEN, "[System] ^3%s^1 has earned the^4 Level 2 Spray^1 Achievement! (^4 %d/17^1 Achievements )", szName( id ), Achievements[ id ] );
//set_user_cash( id, get_user_cash( id ) + 1000 );
}
if ( Sprayed[ id ] == 1000 )
{
Achievements[ id ] += 1;
ColorChat( 0, GREEN, "[System] ^3%s^1 has earned the^4 Level 3 Spray^1 Achievement! (^4 %d/17^1 Achievements )", szName( id ), Achievements[ id ] );
//set_user_cash( id, get_user_cash( id ) + 3000 );
}
return PLUGIN_CONTINUE;
}