14.02.2015, 02:40
Код:
if( !strcmp( cmd, "/staff", true )) { if( dini_Int( f( playerid ), "Patrao" ) == 0 ) { return 0; } tmp = strtok( cmdtext, idx ); if( !strlen( tmp )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /Staff [ Admin ] [ ID ]" ); return 1; } else if( !strcmp( tmp, "Admin", true )) { tmp = strtok( cmdtext, idx ); if( !strlen( tmp )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /Staff [ Admin ] [ ID ]" ); return 1; } new id = strval( tmp ) ; if( !IsPlayerConnected( id )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Ninguйm online com esse ID !" ); return 1; } if( aInfo[ id ][ Administrador ] == 0 ) { format( gstring, sizeof( gstring ), "[ > ] Vocк tornou um gerente o jogador '%s'.", PlayerName( id )); SendClientMessage( playerid, 0x66FF00AA, gstring ); format( gstring, sizeof( gstring ), "( PARABЙNS ) Vocк recebeu privilegios de gerente por '%s'.", PlayerName( playerid )); SendClientMessage( id, 0x66FF00AA, gstring ); aInfo[ id ][ administrador ] = 1; dini_IntSet( f( id ), "Adminstrador", 1 ); } else if( aInfo[ id ][ Administrador ] == 1 ) { format( gstring, sizeof( gstring ), "[ > ] Vocк removeu os privilйgios de administrador de '%s'.", PlayerName( id )); SendClientMessage( playerid, 0x66FF00AA, gstring ); format( gstring, sizeof( gstring ), "[ INFO ] '%s' removeu os privilйgios de administrador de vocк.", PlayerName( playerid )); SendClientMessage( id, 0x66FF00AA, gstring ); aInfo[ id ][ Administrador ] = 0; dini_IntSet( f( id ), "Adminstrador", 0 ); } return 1; }