if(Player[playerid][pAdmin] < 5)
if( !strcmp( cmd, "/SetarLevel", true ))
{
if( aInfo[ playerid ][ Admin ] == 1 )
{
tmp = strtok( cmdtext, idx );
if( !strlen( tmp ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /setarlevel [ ID ] [ Level ]" );
return 1;
}
new
id = strval( tmp )
;
tmp = strtok( cmdtext, idx );
if( !strlen( tmp ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /setarlevel [ ID ] [ Level ]" );
return 1;
}
new
level = strval( tmp )
;
if( !IsPlayerConnected( id ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Ninguйm online com esse ID !" );
return 1;
}
format( gStr, sizeof( gStr ), "%s level %d recebeu %d LEVEL do(a) administrador(a) %s", PlayerName( id ), pInfo[ id ][ Level ], level, PlayerName( playerid ));
log_setados_level( gStr );
format( gstring, sizeof( gstring ), "[ > ] Vocк setou %d level para %s - Level anterior %d", level, PlayerName( id ), pInfo[ id ][ Level ] );
SendClientMessage( playerid, 0x00FF66AA, gstring );
format( gstring, sizeof( gstring ), "[ NWO Admin ] O(A) administrador(a) %s setou %d level pra vocк.", PlayerName( playerid ), level );
SendClientMessage( id, 0x00FF66AA, gstring );
dini_IntSet( f( id ), "Level", level );
pInfo[ id ][ Level ] = level;
SetPlayerScore( id, level );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem permissгo !" );
}
return 1;
}
if(!strcmp(cmdtext,"/comando",true))
{
if(aInfo[ playerid ][ Admin ] >= 2)
{
//funcoes aqui
}else{
SendClientMessage(playerid, -1, "Vocк nгo й admin level 2");
}
return 1;
}
//de:
aInfo[ playerid ][ Admin ] == 1
//para:
aInfo[ playerid ][ Admin ] >= 1
if(!strcmp(cmdtext,"/comando",true))
{
if(aInfo[ playerid ][ Admin ] == 2)
{
//funcoes aqui
}else{
SendClientMessage(playerid, -1, "Vocк nгo й admin level 2");
}
return 1;
}
if(!strcmp(cmdtext,"/comando",true))
{
if(aInfo[ playerid ][ Admin ] >= 2)
{
//funcoes aqui
}else{
SendClientMessage(playerid, -1, "Vocк nгo й admin level 2");
}
return 1;
}
entao basta eu reformar todos os comandos de
PHP код:
para: PHP код:
|
if(!strcmp(cmdtext,"/comando",true))
{
if(aInfo[ playerid ][ Admin ] >= 3)
{
//funcoes
}else{
//mensagem de erro.
}
}