[AJUDA] ID do player
#1

Tudo que eu adiciono no meu gm, como exemplo /dar [id], /transferir [id], /ban [id] e etc...
sу retorna o ID 0, se eu dou /transferir 14 5000, o dinheiro sу vai pro id 0, sempre o ID 0, eu nгo sei aonde que estб esse erro no GM, entгo eu queria que tipo pudesse bloquear o id 0 do server, quando player entrar, nгo pegar o id 0.

alguem ajuda?
Reply
#2

codigo?
Reply
#3

Bloquear o Id 0 nгo й soluзгo..

posta os codigos dos seus comandos, pra gente ver.. ^^
Reply
#4

Simplesmente Atualize a Plugin sscanf
Reply
#5

pawn Код:
COMMAND:ban(playerid, params[])
{
    // Setup local variables
    new PlayerToBan, Days, Hours, Reason[128], TotalBanTime, Msg[128], Name[24], AdminName[24];

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/ban", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // Check if the player's admin-level is at least 3
        if (APlayerData[playerid][PlayerLevel] >= 3)
        {
            if (sscanf(params, "uiis[128]", PlayerToBan, Days, Hours, Reason))
                SendClientMessage(playerid, 0xFF0000AA, "Use: \"/ban <Id> <Dias> <Horas> <Razгo>\"");
            else
            {
                if (IsPlayerConnected(PlayerToBan))
                {
                    // Get the names of the player and the admin who executed the ban
                    GetPlayerName(playerid, AdminName, sizeof(AdminName));
                    GetPlayerName(PlayerToBan, Name, sizeof(Name));

                    // Increase the number of bans
                    APlayerData[PlayerToBan][Bans]++;
                    // Calculate the total bantime (when the player can login again)
                    TotalBanTime = (Days * 86400) + (Hours * 3600) + gettime();
                    // Check if this is the player's 5th ban
                    if (APlayerData[PlayerToBan][Bans] == 5)
                        APlayerData[PlayerToBan][BanTime] = 2147483640; // Make the ban permanent (as high as it can go)
                    else
                        APlayerData[PlayerToBan][BanTime] = TotalBanTime; // Store this value for the player

                    // Inform the player about his ban
                    // Check if this is the player's 5th ban
                    if (APlayerData[PlayerToBan][Bans] == 5)
                    {
                        format(Msg, 128, "vocк foi banido permanentemente por %s, esse foi o seu 5є ban", AdminName);
                        SendClientMessage(PlayerToBan, 0x808080FF, Msg);
                    }
                    else
                    {
                        format(Msg, 128, "Vocк foi banido por %s por %i dias e %i horas", AdminName, Days, Hours);
                        SendClientMessage(PlayerToBan, 0x808080FF, Msg);
                        format(Msg, 128, "Razгo: {FF0000}%s", Reason);
                        SendClientMessage(PlayerToBan, 0x808080FF, Msg);
                        format(Msg, 128, "Se vocк acha que o BAN foi injustamente, tire um print e poste em nosso fуrum", Reason);
                        SendClientMessage(PlayerToBan, 0xFF0000AA, Msg);
                        format(Msg, 128, "Vocк foi banido %i vezes, o maximo de bans й 5, se ultrapassar й ban permanentemente", APlayerData[PlayerToBan][Bans]);
                        SendClientMessage(PlayerToBan, 0x808080FF, Msg);
                    }

                    // Kick the player (his data will be saved)
                    Kick(PlayerToBan);

                    // Inform everybody else which player was banned and for how long
                    format(Msg, 128, "%s %s baniu %s por %i dias e %i horas", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name, Days, Hours);
                    SendClientMessageToAll(0x808080FF, Msg);
                }
            }
        }
        else
            return 0;
    }
    else
        return 0;

    return 1;
}
Reply
#6

Atualize as Includes/Pluings '-'
Reply
#7

hum, vou atualizar, se der certo, +rep pra todos ai que tentaram.
Reply
#8

Apenas o Plaugin sscanf atulize
Reply
#9

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение
Apenas o Plaugin sscanf atulize
Sу pra lembrar, baixe a sscanf2 quem й bem melhor (Acho que vocк jб sabem nй? -q)
Reply
#10

baixei o sscanf2, atualizei tudo mais quando eu ligo o sv aparece isso:

[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.
[15:06:26] sscanf error: System not initialised.

e o plugin nгo carrega
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)