[Ajuda] Problema com Funзoes
#1

Estou com um problema no meu gamemode onde duas funcoes muito importantes para meu infoorg estao dando problema, GetPlayerID e IsPlayerOnline, queria saber se essas funзoes estao na include a_samp ou se estao em outra include, ate porque no momento as unicas includes do gm sao a_samp, dini, zcmd e sscanf.

Agradeзo desde ja
Reply
#2

Negativo, estas funзхes nгo se encontram no include a_samp!!

GetPlayerID
pawn Код:
stock GetPlayerID(const playername[]) //By Jan "DracoBlue" Schьtze (edited by Gabriel "Larcius" Cordes)
{
    new playername1[256];
    for (new i=0;i<MAX_PLAYERS;i++)
    {
        if (IsPlayerConnected(i))
        {
            GetPlayerName(i,playername1,sizeof(playername1));
            if (strcmp(playername1,playername,true)==0)
            {
                return i;
            }
        }
    }
}
A outra eu nгo tenho!
Se te ajudei da Rep. pls
Reply
#3

vlw rep add, alguem tem o IsPlayerOnline?
Reply
#4

IsPlayerOnline seria o mesmo que IsPlayerConnected??
pawn Код:
#define IsPlayerOnline IsPlayerConnected
Reply
#5

Acho que й diferente, estou usando o Infoorg de outro gm, e ele ate usa IsPlayerConnected e IsPlayerOnline no mesmo code, logo imagino que nao seja a mesma coisa.
Reply
#6

IsPlayerOnline , nгo seria IsPlayerConnected ?
Reply
#7

pawn Код:
stock isPlayerOnline ( nome[] ) //by Ricop522
{
    for(new a = 0, b = GetMaxPlayers(); a < b; ++a);
    {
        new name2[MAX_PLAYER_NAME];
        GetPlayerName(a, name2, sizeof(name2));
        if (strcmp(nome, name2, true) != 0) {
            return true;
        }
    }
    return false;
}
Eu fiz pra vocк, testa ai se funciona , abзs
se for por id:
pawn Код:
stock isPlayerOnline(id) {
    if(IsPlayerConnected(id)) return true;
    return false;
}
Reply
#8

Tenta como eu falei se funcionar й lucro...

@EDIT

Esquece ja vocк tem a func.
Reply
#9

pawn Код:
GetPlayerID(p[])
{
    new a[24];
    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerName(i, a, 24);
            if(!strcmp(p, a, true))
            {
                return i;
            }
        }
    }
    return 0;
}

#define IsPlayerOnline IsPlayerConnected
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)