if(strcmp(cmd, "/daradmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1343)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
return 1;
}
AdmsVaga();
if(VagaSobrando == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparadm primeiro.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [id] [Nivel]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [id] [Nivel]");
return 1;
}
level = strval(tmp);
if(level == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparadmin para limpar uma vaga");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(string, sizeof(string), " Vocк Foi promovido para level %d de Admin - Por %s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк promoveu o(a) %s Para o level %d de Admin.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s deu admin nivel %d para %s [%d/%d/%d] бs [%d:%d:%d].", sendername, level, giveplayer, day,
month, year, hour, minute, second);
PAdminsLog(string);
for(new i = 0; i < sizeof(AdmInfo); i++)
{
if(PlayerInfo[para1][pAdmin] > 0)
{
PlayerInfo[para1][pAdmin] = level;
break;
}
else if(AdmInfo[i][AdminVaga] == 0)
{
PlayerInfo[para1][pAdmin] = level;
AdmInfo[i][gMembro] = giveplayer;
AdmInfo[i][AdminVaga] = 1;
SaveAdm();
break;
}
}
}
}
}
return 1;
}
if(strcmp("/limparadm", cmdtext, true, 10) == 0 || strcmp("/limparadmin", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1343)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparadm [ Vaga ]");
return 1;
}
new Vagao = strval(tmp);
if(Vagao < 1 || Vagao > 30) { SendClientMessage(playerid, COLOR_GREY, "Vaga mнnima 1 mбximo 30!"); return 1; }
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s apagou a vaga %d de %s [%d/%d/%d] бs [%d:%d:%d].", PlayerName(playerid), Vagao, AdmInfo[Vagao][gMembro], day,
month, year, hour, minute, second);
PAdminsLog(string);
strmid(AdmInfo[Vagao][gMembro], "Vazio", 0, strlen("Vazio"), 255);
AdmInfo[Vagao][AdminVaga] = 0;
SaveAdm();
format(string, sizeof(string), "Vocк Limpou A Vaga Nє %d",Vagao);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
if(strcmp("/infoadm", cmdtext, true, 10) == 0 || strcmp("/infoadmin", cmdtext, true, 10) == 0 || strcmp("/infoadmins", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
return 1;
if(strcmp(cmd, "/daradmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1343 || IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
return 1;
}
AdmsVaga();
if(VagaSobrando == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparadm primeiro.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [id] [Nivel]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [id] [Nivel]");
return 1;
}
level = strval(tmp);
if(level == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparadmin para limpar uma vaga");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(string, sizeof(string), " Vocк Foi promovido para level %d de Admin - Por %s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк promoveu o(a) %s Para o level %d de Admin.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s deu admin nivel %d para %s [%d/%d/%d] бs [%d:%d:%d].", sendername, level, giveplayer, day,
month, year, hour, minute, second);
PAdminsLog(string);
for(new i = 0; i < sizeof(AdmInfo); i++)
{
if(PlayerInfo[para1][pAdmin] > 0)
{
PlayerInfo[para1][pAdmin] = level;
break;
}
else if(AdmInfo[i][AdminVaga] == 0)
{
PlayerInfo[para1][pAdmin] = level;
AdmInfo[i][gMembro] = giveplayer;
AdmInfo[i][AdminVaga] = 1;
SaveAdm();
break;
}
}
}
}
}
return 1;
}
atah eu imaginava que era && apenas, || pensei que tinha de ser as duas coisas, nossa vlw brigadao PT
|