/retiraradmin nгo funciona -
NuTShoT - 19.02.2013
Olб amigos!
Me ajudem. O comando quando colocamos um nick invalido aparece: "Este Nick nгo existe no servidor, digite um nome correto EX: Nome_Sobrenome" Ao colocarmos um nick correto nгo temos efeito nenhum.
pawn Код:
if(strcmp(cmd, "/retiraradmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"USE: /retiraradmin [NOME_CORRETO]");
return true;
}
if (PlayerInfo[playerid][pAdmin] >= 1341)
{
new string3[64];
new string4[64];
format(string3, sizeof(string3), "RetirarAdmin/%s.ini", tmp);
format(string4, sizeof(string4), "Contas/%s.ini", tmp);
if(!dini_Exists(string4))
{
SendClientMessage(playerid,COLOR_GRAD1,"Este Nick nгo existe no servidor, digite um nome correto EX: Nome_Sobrenome");
return true;
}
if(dini_Exists(string3))
{
SendClientMessage(playerid,COLOR_GRAD1,"Este Nick ja estб na lista de retirada de admin, para remover da lista USE: /rlistaadmin");
return true;
}
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[32];
format(var, 32, "Admin=AINDA NAO RETIRADO");
fwrite(hFile, var);
fclose(hFile);
format(string, sizeof(string), "Vocк retirou o admin do jogador offline: %s.", tmp);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
}
}
return true;
}
Vlw!
Re: /retiraradmin nгo funciona -
Jefferson Santos - 19.02.2013
Verica se contem as pastas usadas no scriptfiles.
pawn Код:
if(strcmp(cmd, "/retiraradmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"USE: /retiraradmin [NOME_CORRETO]");
return true;
}
if (PlayerInfo[playerid][pAdmin] >= 1341)
{
//=====================================
new string3[64];
new string4[64];
format(string3, sizeof(string3), "Retiraradmin/%s.ini", tmp);
format(string4, sizeof(string4), "Contas/%s.ini", tmp);
if(!DOF2_FileExists(string4))
{
SendClientMessage(playerid,COLOR_GRAD1,"Este Nick nгo existe no servidor, digite um nome correto EX: Nome_Sobrenome");
return true;
}
if(DOF2_FileExists(string3))
{
SendClientMessage(playerid,COLOR_GRAD1,"Este Nick ja estб na lista de retirada de admin, para remover da lista USE: /rlistaadmin");
return true;
}
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[32];
format(var, 32, "Admin=AINDA NAO RETIRADO");
fwrite(hFile, var);
fclose(hFile);
format(string, sizeof(string), "Vocк retirou o admin do jogador offline: %s.", tmp);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
}
}
return true;
}
pawn Код:
//Em OnPlayerLogin
new string5[64];
format(string5, sizeof(string5), "Retiraradmin/%s.ini", PlayerName(playerid));
if(fexist(string5) && PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED,"[MSG] Vocк nгo й mais um admin do servidor!");
PlayerInfo[playerid][pAdmin] = 0;
new File: hFile = fopen(string5, io_write);
if (hFile)
{
new var[32];
format(var, 32, "Admin=RETIRADO");fwrite(hFile, var);
fclose(hFile);
}
}
Re: /retiraradmin nгo funciona -
MorreJa - 19.02.2013
Coloque aqui o codigo /daradmin
Re: /retiraradmin nгo funciona -
NuTShoT - 19.02.2013
Olб a pasta existe.