CMD:desban(playerid,params[])
{
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,white,"» "cred"Vocк nгo tem permissгo para usar este comando!");
static string[500], id;
format(string,sizeof string, Userfile,GetPName(id));
INI_Open(string);
INI_WriteInt("Banned",0);
INI_Save();
INI_Close();
format(string,sizeof string,"%s desbaniu %s.",GetPName(playerid),GetPName(id));
return 1;
}
CMD:desbanip(playerid,params[])
{
new
IP[80],
String1[128]
;
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,"[x] Vocк nгo tem permissгo para fazer isso!");
if(isnull(params,"s",IP)) return SendClientMessage(playerid,red,"{FFFF00}[ > ] Uso correto: /desbanip [ip]");
format(String1,sizeof(String1),"unbanip %s",IP);
SendRconCommand(String1);
SendRconCommand("reloadbans");
SendClientMessage(playerid,orange,"{FFFF00}[ > ] O IP %s foi desbanido com sucesso! ", IP);
return 1;
}
CMD:desban(playerid,params[]) { new IDDESBAN[158]; if(sscanf(params"s[158]", IDDESBAN)) return SendClientMessage(playerid, - 1,"Burro use o CMD certo: /desban Nick"); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,white,"» "cred"Vocк nгo tem permissгo para usar este comando!"); static string[500], id; format(string,sizeof string, Userfile,GetPName(IDDESBAN)); INI_Open(string); INI_WriteInt("Banned",0); INI_Save(); INI_Close(); format(string,sizeof string,"%s desbaniu %s.",GetPName(playerid),GetPName(IDDESBAN)); return 1; }
CMD:desbanip(playerid,params[]) { new Float: IP[80], String1[128] ; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,"[x] Vocк nгo tem permissгo para fazer isso!"); if(isnull(params,"s",IP)) return SendClientMessage(playerid,red,"{FFFF00}[ > ] Uso correto: /desbanip [ip]"); format(String1,sizeof(String1),"unbanip %s",IP); SendRconCommand(String1); SendRconCommand("reloadbans"); SendClientMessage(playerid,orange,"{FFFF00}[ > ] O IP %s foi desbanido com sucesso! ", IP); return 1; }
dcmd_unbanacc(playerid, params[])
{
if (PlayerInfo[playerid][Level] < 4) return SendClientMessage(playerid, red, "[ERRO]: Vocк nгo tem permissгo para isso");
if (strlen(params) < 3) return SendClientMessage(playerid, red, "USO: /unbanacc [NICK]");
if (IsIllegalName(params)) return SendClientMessage(playerid, red, "[ERRO]: Nick ilegal");
if (!udb_Exists(params)) return SendClientMessage(playerid, red, "[ERRO]: A conta nгo existe");
if (PlayerInfo[playerid][Level] < 5)
{
if (dUserINT(params).("level") >= 1) return SendClientMessage(playerid, red, "[ERRO]: A conta pertence a um ADMIN");
}
if (dUserINT(params).("banned") == 0 && dUserINT(params).("tmpb") == 0) return SendClientMessage(playerid, red, "[ERRO]: A conta nгo estб banida");
dUserSetINT(params).("banned", 0);
if (dUserINT(params).("tmpb") == 1)
{
dUserSetINT(params).("tmpb", 0);
dUserSetINT(params).("tmpbs", 0);
dUserSetINT(params).("tmpbh", 0);
}
new SampDotBan[128], file[255];
format(file, sizeof(file), "/ladmin/users/%s.sav", udb_encode(params));
new tmp2[256];
tmp2 = dini_Get(file, "ip");
format(SampDotBan, sizeof(SampDotBan), "unbanip %s", tmp2);
SendRconCommand(SampDotBan);
SendRconCommand("reloadbans");
if (dUserINT(params).("banned") == 0)
{
CMDMessageToAdmins(playerid, "UNBANACC");
//--------------- LOGAR
new ADMNAME[MAX_PLAYER_NAME];
GetPlayerName(playerid, ADMNAME, MAX_PLAYER_NAME);
new logstring[128];
format(logstring, sizeof(logstring), "%s desbaniu a conta + IP de %s", ADMNAME, params);
SaveToFile("UnbannedAccs", logstring);
//---------------
SendClientMessage(playerid, blue, "A conta e o IP associado foram desbanidos com sucesso!");
}
else
{
SendClientMessage(playerid, blue, "Erro ao desbanir a conta");
}
return 1;
}
Код:
CMD:desban(playerid,params[]) { new IDDESBAN[158]; if(sscanf(params"s[158]", IDDESBAN)) return SendClientMessage(playerid, - 1,"Burro use o CMD certo: /desban Nick"); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,white,"» "cred"Vocк nгo tem permissгo para usar este comando!"); static string[500], id; format(string,sizeof string, Userfile,GetPName(IDDESBAN)); INI_Open(string); INI_WriteInt("Banned",0); INI_Save(); INI_Close(); format(string,sizeof string,"%s desbaniu %s.",GetPName(playerid),GetPName(IDDESBAN)); return 1; } Код:
CMD:desbanip(playerid,params[]) { new Float: IP[80], String1[128] ; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,"[x] Vocк nгo tem permissгo para fazer isso!"); if(isnull(params,"s",IP)) return SendClientMessage(playerid,red,"{FFFF00}[ > ] Uso correto: /desbanip [ip]"); format(String1,sizeof(String1),"unbanip %s",IP); SendRconCommand(String1); SendRconCommand("reloadbans"); SendClientMessage(playerid,orange,"{FFFF00}[ > ] O IP %s foi desbanido com sucesso! ", IP); return 1; } |
if(isnull(p
#define LENGHT_STRING (17)
// fix
new IP[LENGHT_STRING];
if( sscanf( params, "s[LENGHT_STRING]", IP ) )
return SCM(...);