[Ajuda] Colocar uma menssagem pra todos online
#3

Quote:
Originally Posted by Lucas_Rocha
Посмотреть сообщение
Tenta

pawn Код:
if(strcmp(cmd, "/multar", true) == 0)
{
    new aname[MAX_PLAYER_NAME];

    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);

    format(file, sizeof(file), PASTA_CONTAS, aname);

    if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1 || IsPlayerAdmin(playerid))
    {
        new tmp[256];
        new plid;

        new quant;

        tmp = strtok(cmdtext, idx);

        if(!strlen(tmp))
        {
            SendClientMessage(playerid, Vermelho, "/multar [id] [quantidade]");
            return 1;
        }

        plid = strval(tmp);

        tmp = strtok(cmdtext, idx);

        if(!strlen(tmp))
        {
            SendClientMessage(playerid, Vermelho, "/multar [id] [quantidade]");
            return 1;
        }

        if(UsouID[plid] == true) return SendClientMessage(playerid, Vermelho, "Espere 1 Minutos para Multar esse ID Novamente!");

        quant = strval(tmp);

        if(quant > 1000 || quant <= 0)
        {
            SendClientMessage(playerid, Vermelho, "(INFO) Vocк nгo estб multando de forma justa.");
            return 1;
        }

        if(IsPlayerConnected(plid))
        {
            new pname[MAX_PLAYER_NAME];

            GetPlayerName(plid, pname, MAX_PLAYER_NAME);

            format(file2, sizeof(file2), PASTA_CONTAS, pname);

            format(string, sizeof(string), "(INFO) Vocк recebeu uma multa de R$%d Pelo policial %s . O dinheiro foi retirado do banco.", quant, aname);
            SendClientMessage(plid, COLOR_GREEN, string);
           
            format(string, sizeof(string), "(INFO) ATENЗГO : %d Foi multado pelo Policial %s com uma quantia de %d.", GetPlayerName , aname , quant );
            SendClientMessageAll(plid, COLOR_GREEN, string);

            SendClientMessage(playerid, COLOR_GREEN, "(INFO) Multa dada.");

            UsouID[plid] = true;

            SetTimerEx("ResetarMultados", 60000, true, "i", plid);

            dini_IntSet(file2, "SaldoBancario", dini_Int(file2, "SaldoBancario")- quant);
            return 1;
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "(INFO) O jogador nгo estб conectado!");
            return 1;
        }
    }
}
Deu 3 erros
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(569 0) : warning 203: symbol is never used: "txtid"
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(114 76) : error 076: syntax error in the expression, or invalid function call
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(114 77) : error 017: undefined symbol "SendClientMessageAll"
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(167 83) : warning 216: nested comment
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(174 2 : warning 209: function "GPS" should return a value
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(180 49) : warning 203: symbol is never used: "entrarutlls"
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(180 49) : warning 203: symbol is never used: "entrarutllv"
C:\Users\RianRBS\Desktop\gm\gamemodes\rian.pwn(180 49) : warning 203: symbol is never used: "sairutllv"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)