[HELP] Command /multar does not show the fine reason
#9

My code looks like this:
PHP код:
if(strcmp(cmd"/multar"true) == 0)
{
    new 
aname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridanameMAX_PLAYER_NAME);
    
format(filesizeof(file), P_CONTASaname);
    if(
dini_Int(file"Profissao") == Policial_C || dini_Int(file"Profissao") == Policial_F || dini_Int(file"Profissao") == Marinha || dini_Int(file"Profissao") == Terrestre || dini_Int(file"Profissao") == Bope || dini_Int(file"Profissao") == Swat || dini_Int(file"Profissao") == Rotam || dini_Int(file"Profissao") == Policial_M || dini_Int(file"Profissao") == FBI || dini_Int(file"Profissao") == Interpol || dini_Int(file"Profissao") == Guarda || IsPlayerAdmin(playerid))
  {
        new 
plid;
        new 
quant;
        new 
mot;
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp)) {
            
SendClientMessage(playeridVermelho"* /multar [id] [quantidade] [motivo]");
            return 
1;
        }
        
mot strval(tmp);
        
plid strval(tmp);
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp)) {
            
SendClientMessage(playeridVermelho"/multar [id] [quantidade][motivo]");
            return 
1;
        }
        
quant strval(tmp);
        if(
quant 1000 || quant <= 0) {
            
SendClientMessage(playeridVermelho"| ERRO | Valor de 0 б 1000R$.");
            return 
1;
        }
        if(
IsPlayerConnected(plid)) {
            if( 
GetPVarIntplayerid"TempoMultar" ) > GetTickCount() ) return SendClientMessageplayerid0xFF0000AA"| ERRO | Vocк sу pode multar a cada 1 minuto." );
            
SetPVarIntplayerid"TempoMultar"GetTickCount() + 60000 );
            new 
pname[MAX_PLAYER_NAME];
            
GetPlayerName(plidpnameMAX_PLAYER_NAME);
            
format(filesizeof(file), P_CONTASpname);
            
format(stringsizeof(string), "| INFO | Vocк recebeu uma multa de '%dR$'. Por '%s'. Motivo: %s"quantanamemot);
            
SendClientMessage(plidCOLOR_GREENstring);
            
SendClientMessage(playeridCOLOR_GREEN"| INFO | Multa aplicada com sucesso.");
            new 
crg[256];
            
format(crgsizeof(crg), "| Policial | O(a) policial '%s' multou o jogador '%s'. Quantia: %dR$. Motivo: %s "anamepnamequantmot);
            
Corregedor(0xC0C0C0AA,crg,1);
            
dini_IntSet(file"SaldoBancario"dini_Int(file"SaldoBancario")- quant);
            
GivePlayerGrana(playeridquant);
            return 
1;
        }
        else {
            
SendClientMessage(playeridVermelho"* O jogador nгo estб conectado!");
            return 
1;
        }
    }

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)