[Ajuda] Banir conta.
#3

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Vou te ajudar, mas nгo vou fazer pra vocк.
Me envia o cуdigo com sscanf pra eu analisar o erro.

//topo do fs
PHP код:
#include sscanf 
Comando:

PHP код:
dcmd_banirconta(playerid,params[]) {
new 
motivo[250]; 
if(
PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,"| ERRO | Comando Invalido!  /Comandos");
if(
sscanf(params"ss",paramsmotivo)) return SendClientMessage (playerid0xFF0000FF"| ERRO | Digite: /Banirconta [Nick] [Motivo]");
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 membro da Administraзгo!");}
if(
dUserINT(params).("banned") == 1) return SendClientMessage(playerid,red,"| ERRO | A Conta jб permanece Banida!");
dUserSetINT(params).("banned",1);
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),"banip %s"tmp2);
SendRconCommand(SampDotBan);
SendRconCommand("reloadbans");
if(
dUserINT(params).("banned") == 1){
CMDMessageToAdmins(playerid,"banirconta");
//--------------- LOGAR
new ADMNAME[MAX_PLAYER_NAME];GetPlayerName(playeridADMNAMEMAX_PLAYER_NAME);
new 
logstring[128];format(logstringsizeof(logstring), "| BAN-LOG | O(A) Admin(a) %s baniu a conta do(a) Jogador(a): (%s)"ADMNAME,params);
SaveToFile("BannedAccs",logstring);
//---------------
SendClientMessage(playerid,azulao,"| INFO | A conta e o IP foi banidas com Sucesso!");
new 
frm[260];
new 
year,month,day,hour,minuite,secondgetdate(yearmonthday); gettime(hour,minuite,second);
format(frm,sizeof(frm),"| GNC-Admin | O(A) %s %s baniu o(a) jogador(a) %s ( Motivo: %s )",CargoAdmin(playerid),ADMNAME,params,motivo,day,month,year,hour,minuite);  //mudei isso
SendClientMessageToAll(red,frm);
}else{
SendClientMessage(playerid,red,"| ERRO | Nгo й possivel banir a conta!");}
return 
1;} 
Porem na hora de testar,o fs do Ladmin,nao funciona na gm
Reply


Messages In This Thread
Banir conta. - by CSSDean - 21.05.2018, 13:13
Re: Banir conta. - by ipsLuan - 21.05.2018, 13:34
Re: Banir conta. - by CSSDean - 21.05.2018, 13:39
Re: Banir conta. - by ipsLuan - 21.05.2018, 13:48
Re: Banir conta. - by CSSDean - 21.05.2018, 13:54
Re: Banir conta. - by ipsLuan - 21.05.2018, 13:57
Re: Banir conta. - by CSSDean - 21.05.2018, 14:00
Re: Banir conta. - by ipsLuan - 21.05.2018, 14:03
Re: Banir conta. - by CSSDean - 21.05.2018, 14:09
Re: Banir conta. - by ipsLuan - 21.05.2018, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)