[AJUDA] PlayerInfo[playerid][pBanido] =
#4

pawn Код:
public OnPlayerConnect(playerid)
{
    new PlayerName[24];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(dini_Exists(udb_encode(PlayerName)))
    {
        PlayerInfo[playerid][pBanido] = dini_Int(udb_encode(playername), "Banido");
    }
}

// OU



public OnPlayerConnect(playerid)
{
    static
        Str[64],
        pN[24];

    GetPlayerName(playerid, pN, 24);
    new File:Arquivo = fopen("Banidos.cfg", io_read);
    while(fread(Arquivo, Str))
    {
        if(!strcmp(Str, pN, true))
        {
            Ban(playerid);
        }
    }
    fclose(Arquivo);
    return 1;
}
nгo esqueзa de colocar
pawn Код:
if(!fexist("Banidos.cfg")) dini_Create("Banidos.cfg");
no final da public BaN().
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)