[Ajuda] BUG SPREE
#1

ALGUEM AE PODE ME AJUDAR?, QUANDO UM PLAYER MATA O OUTRO, O SPREE CONTA PROS 2 PLAYERS COMO FAЗO PARA CONCERTAR ISSO?, ESTA AE UMA PARTE DO CODIGO.
Код:
new Text:scoreandping[MAX_PLAYERS];
new Updater;
new pkills[MAX_PLAYERS];


forward ScorenPing(playerid);

public ScorenPing(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new string[256];
            format(string,sizeof(string)," ~w~] ~r~~h~Score: ~w~%d~n~ ~w~] ~r~~h~Ping: ~w~%d~n~ ~w~] ~r~~h~Fps: ~w~%d~n~ ~w~] ~r~~h~Spree: ~w~%d",GetPlayerScore(i),GetPlayerPing(i),GetPlayerFPS(i),pkills);
            TextDrawSetString(scoreandping[i], string);
        }
    }
}

public OnPlayerDeath(playerid, killerid, reason)
{
    pkills[playerid] = 0;
    pkills[killerid]++;
    GameTextForPlayer(killerid,"~r~+1 ~w~Kill!",1500,6);
    return 1;
}

stock GetPlayerFPS(playerid)
{
    SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));
    if(GetPVarInt(playerid, "DrunkL") < 100)
    {
        SetPlayerDrunkLevel(playerid, 2000);
    }
    else
    {
        if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL"))
        {
            SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));
            SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));
            if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256))
            {
                return GetPVarInt(playerid, "FPS") - 1;
            }
        }
    }
    return 0;
}
Reply
#2

Tenta usar essa condicional:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
       pkills[killerid]++,
       GameTextForPlayer(killerid,"~r~+1 ~w~Kill!",1500,6);

    pkills[playerid] = 0;
    return 1;
}
Reply
#3

new totalkills[MAX_PLAYERS] = 0;
public OnPlayerDeath(playerid, killerid, reason)
{
new string[128];
new emris[128]; // emris = name
GetPlayerName(killerid, emris, sizeof(emris));

totalkills[killerid]++;
totalkills[playerid] = 0;

if(totalkills[killerid] == 6) {
format(string, sizeof(string), "SERVER: %s KILLING SPREE", emris);
SendClientMessageToAll(-1, string);
return 1;
}
return 1;
}
Reply
#4

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Tenta usar essa condicional:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
       pkills[killerid]++,
       GameTextForPlayer(killerid,"~r~+1 ~w~Kill!",1500,6);

    pkills[playerid] = 0;
    return 1;
}
Continua bugando ainda
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)