[Ajuda] Como salvar Dia,Mes,Ano no /ban
#1

Eu to aqui tentando fazer salvar o dia mes e ano no /ban , so que como nunca fiz nada q levasse dia mes ano, tenho certeza que fiz quase tudo errado, entгo vim pedir ajuda...

PHP код:
CMD:ban(playeridparams[])
{
    if(
DylanInfo[playerid][dAdmin] < 3) return SendClientMessage(playeridVermelho"** Vocк nгo tem level de Administrador Suficiente.");
    if(
DylanInfo[playerid][dLogado] == false) return SendClientMessage(playeridVermelho"** Vocк nгo estб logado como Administrador.");
    new 
motivo[128];
    if(
sscanf(params"us[128]"Outroplayeridmotivo)) return SendClientMessage(playerid, -1"** Correto: /ban [ID/Nome] [Motivo]");
    if(!
IsPlayerConnected(Outroplayerid)) return SendClientMessage(playeridVermelho_Claro"** Player nгo conectado/Player invalido.");
    
DylanInfo[Outroplayerid][dBanido] = 1;
    
SendClientMessageFormatToAll(Vermelho"*** %s foi banido pelo administrador %s, Motivo[ %s ]."NomedoCara(playerid), NomedoCara(Outroplayerid), motivo);
    
format(stryngsizeof(stryng), "/DylanDM/Banidos/%s.ini"NomedoCara(Outroplayerid));
    if(!
fexist(stryng)) { INI_Create(stryng); }
    
INI_Open(stryng);
    new 
stryng2[128],
        
a,
        
m,
        
d;
    
getdate(amd);
    
format(stryng2sizeof(stryng2), "%s"motivo);
    
INI_WriteString(stryngstryng2);
    
format(stryng2sizeof(stryng2), "%02d"d);
    
INI_WriteInt("Dia"stryng2);
    
format(stryng2sizeof(stryng2), "%02d"m);
    
INI_WriteInt("Mes"stryng2);
    
format(stryng2sizeof(stryng2), "%d"a);
    
INI_WriteInt("Ano"stryng2);
    
INI_Save();
    
INI_Close();
    
Kick(Outroplayerid);
    return 
true;

No code se usa bini ...

Erros :

pawn Код:
C:\Users\Washington\Desktop\testes\gamemodes\dm.pwn(408) : error 035: argument type mismatch (argument 2)
C:\Users\Washington\Desktop\testes\gamemodes\dm.pwn(410) : error 035: argument type mismatch (argument 2)
C:\Users\Washington\Desktop\testes\gamemodes\dm.pwn(412) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
As linhas sao as que estao salvando o dia mes e ano..
Reply
#2

pawn Код:
format(stryng2, sizeof(stryng2), "%02d", d);
INI_WriteInt("Dia", stryng2);
vocк estб salvando uma string e nгo um inteiro
Reply
#3

@Off Falcon entra msn
Reply
#4

Й testei sem stryng2 e funcionou Obg.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)