[Ajuda] Ladmin
#1

Galera, eu uso o LadminV4 e tipo, quando o player entra e se registra e mata o primeiro player ganha 1 score e money, mas depois sу o score aumenta o dinheiro nгo aumenta ele fixa naquela quantidade e nгo sai de lб, alguйm sabe oque pode ser?
Reply
#2

ТnPlayerDeath. Poste-o.
Reply
#3

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

//AntiAbusoX
if(killerid != INVALID_PLAYER_ID){
if(LATickCount - KillerTick[killerid] <= 3){
KillerTick[killerid] = LATickCount;
return 1;}
KillerTick[killerid] = LATickCount;}

//ANTI FAKE-KILL
//if(GetPlayerState(playerid) != PLAYER_STATE_WASTED) return 1;


//PlayerInfo[playerid][PlayerSkin] = GetPlayerSkin(playerid);
KillTimer(ExplodirTimer[playerid]);
    #if defined USE_STATS
    PlayerInfo[playerid][Deaths]++;
    #endif
    InDuel[playerid] = 0;
   
    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
        #if defined USE_STATS
        PlayerInfo[killerid][Kills]++;
        #endif
       
        if(InDuel[playerid] == 1 && InDuel[killerid] == 1)
        {
            GameTextForPlayer(playerid,"Perdedor !",3000,3);
            GameTextForPlayer(killerid,"Vencedor !",3000,3);
            InDuel[killerid] = 0;
            SetPlayerPos(killerid, 0.0, 0.0, 0.0);
            SpawnPlayer(killerid);
        }
        else if(InDuel[playerid] == 1 && InDuel[killerid] == 0)
        {
            GameTextForPlayer(playerid,"Perdedor !",3000,3);
        }
    }

    #if defined ENABLE_SPEC
    for (new x = 0; x < MAX_PLAYERS; x++) if(IsPlayerConnected(x))
        if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid)
           AdvanceSpectate(x);
    #endif
   

    return 1;
}
Reply
#4

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

//AntiAbusoX
if(killerid != INVALID_PLAYER_ID){
if(LATickCount - KillerTick[killerid] <= 3){
KillerTick[killerid] = LATickCount;
return 1;}
KillerTick[killerid] = LATickCount;}

//ANTI FAKE-KILL
//if(GetPlayerState(playerid) != PLAYER_STATE_WASTED) return 1;


//PlayerInfo[playerid][PlayerSkin] = GetPlayerSkin(playerid);
KillTimer(ExplodirTimer[playerid]);
    #if defined USE_STATS
    PlayerInfo[playerid][Deaths]++;
    #endif
    InDuel[playerid] = 0;

    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
        #if defined USE_STATS
        PlayerInfo[killerid][Kills]++;
        #endif

        if(InDuel[playerid] == 1 && InDuel[killerid] == 1)
        {
            GameTextForPlayer(playerid,"Perdedor !",3000,3);
            GameTextForPlayer(killerid,"Vencedor !",3000,3);
            InDuel[killerid] = 0;
            SetPlayerPos(killerid, 0.0, 0.0, 0.0);
            SpawnPlayer(killerid);
        }
        else if(InDuel[playerid] == 1 && InDuel[killerid] == 0)
        {
            GameTextForPlayer(playerid,"Perdedor !",3000,3);
        }
    }

    #if defined ENABLE_SPEC
    for (new x = 0; x < MAX_PLAYERS; x++) if(IsPlayerConnected(x))
        if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid)
           AdvanceSpectate(x);
    #endif

    GivePlayerMoney(killerd, 1000); // Aqui a quantidade que o player irб receber ao matar alguйm.
    return 1;
}

\/
Reply
#5

Garfiel, o meu sistema de score й dentro do gm o fs do ladmin continuara a interferir no sistema?
Reply
#6

Nгo, Poste-o o sistema do gamemode.
Reply
#7

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid,playerid,reason);
    if((gTeam[playerid] == TEAM_HUMAN) && (gTeam[killerid] == TEAM_ZOMBIE))
    {
        gTeam[playerid] = TEAM_ZOMBIE;
        SetPlayerColor(playerid, ADMIN_RED);
        SendClientMessage(playerid, 0xF7F700, "[SERVER] - Vocк foi Infectado");
        SendClientMessageToAll(0xF7F700, "[SERVER] - Um Humano foi Infectado");
        GivePlayerMoney(killerid, 5000);
        GameTextForPlayer(killerid,"~p~+1 XP ~n~~w~+$5000",6000,4);
        SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
        return 1;
    }
    else if((gTeam[playerid] == TEAM_ZOMBIE) && (gTeam[killerid] == TEAM_HUMAN))
    {
        SetPlayerColor(playerid, ADMIN_RED);
        SendClientMessage(killerid, 0xF7F700, "[SERVER] - Vocк Matou um zombie ");
        SendClientMessageToAll(0xF7F700, "[SERVER] - Um Zombie Foi morto");
        GivePlayerMoney(killerid, 5000);
        GameTextForPlayer(killerid, "~p~+1 XP ~n~~w~+$5000", 6000, 4);
        SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    }
    return 1;
}

No ladmin deu esses erros

pawn Код:
error 017: undefined symbol "killerd"
pawn Код:
warning 203: symbol is never used: "params"
A do Params resolvi, йra outro cod.
Reply
#8

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

//AntiAbusoX
if(killerid != INVALID_PLAYER_ID){
if(LATickCount - KillerTick[killerid] <= 3){
KillerTick[killerid] = LATickCount;
return 1;}
KillerTick[killerid] = LATickCount;}

//ANTI FAKE-KILL
//if(GetPlayerState(playerid) != PLAYER_STATE_WASTED) return 1;


//PlayerInfo[playerid][PlayerSkin] = GetPlayerSkin(playerid);
KillTimer(ExplodirTimer[playerid]);
    #if defined USE_STATS
    PlayerInfo[playerid][Deaths]++;
    #endif
    InDuel[playerid] = 0;

    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
        #if defined USE_STATS
        PlayerInfo[killerid][Kills]++;
        #endif

        if(InDuel[playerid] == 1 && InDuel[killerid] == 1)
        {
            GameTextForPlayer(playerid,"Perdedor !",3000,3);
            GameTextForPlayer(killerid,"Vencedor !",3000,3);
            InDuel[killerid] = 0;
            SetPlayerPos(killerid, 0.0, 0.0, 0.0);
            SpawnPlayer(killerid);
        }
        else if(InDuel[playerid] == 1 && InDuel[killerid] == 0)
        {
            GameTextForPlayer(playerid,"Perdedor !",3000,3);
        }
    }

    #if defined ENABLE_SPEC
    for (new x = 0; x < MAX_PLAYERS; x++) if(IsPlayerConnected(x))
        if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid)
           AdvanceSpectate(x);
    #endif

    GivePlayerMoney(killerid, 1000); // Aqui a quantidade que o player irб receber ao matar alguйm.
    return 1;
}
Reply
#9

Garfiel, eu uso o comando /setallcash [mount] ele seta mas nгo para de encher o money '-' fica sу subindo, e o Dinheiro fica congelado ainda '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)