[Ajuda] "/inativos"
#1

pawn Code:
if(strcmp(cmdtext, "/inativos", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] < 1340) return SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando");
        for(new i = 0; i < 24; i++)
        {
            new string2[80], val[100], msg[100];
            format(string2, sizeof(string2), "Contas/%s.ini", InfoOrg[i][Lider]);
            new File: UserFile = fopen(string2, io_read);
           
            format(msg, sizeof(msg), "Ъltimo login de %s, foi: %s", InfoOrg[i][Lider], val);
            SendClientMessage(playerid, COLOR_YELLOW, msg);
            fclose(UserFile);
        }
        return 1;
    }
Alguйm sabe como eu pego a data na parte: "LU='24/44/1541/12/54/15'" (exemplo) do arquivo da conta?
Reply
#2

O melhor que vocк faz, й salvar o ultimo login do lider no prуprio infoorg..
Reply
#3

pawn Code:
if( strcmp( key , "LU" , true ) == 0 )
                    {
                        val = ini_GetValue( Data );
                        strmid(PlayerInfo[playerid][pLastLogin], val, 0, strlen(val)-1, 255);
                        new arquivo[128];
                        format(arquivo, sizeof(arquivo), "ORG Arquivos/Org%d.cfg",GetPlayerOrg(playerid));
                        for(new i = 0; i < 24; i++)
                        {
                            if(InfoOrg[i][Lider] == PlayerName(playerid)) //line 14670
                            {
                                InfoOrg[i][LastLogin] = PlayerInfo[playerid][pLastLogin];
                                dini_Set(arquivo, "LastLogin", InfoOrg[i][LastLogin]);
                            }
                        }
                    }
Code:
C:\Documents and Settings\Cristhian\Desktop\Server Samp\Server Samp\gamemodes\Final.pwn(14670) : error 033: array must be indexed (variable "PlayerName")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Como resolvo isso?
Reply
#4

Manda este Playername ai.
Reply
#5

Nгo й o PlayerName nгo, por que eu tentei colocar:
pawn Code:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name))
e apareceu:
Code:
C:\Documents and Settings\Cristhian\Desktop\Server Samp\Server Samp\gamemodes\Final.pwn(14670) : error 033: array must be indexed (variable "name")
Reply
#6

Alguйm ?
Reply
#7

pawn Code:
new alguem[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, alguem, sizeof(alguem));
Reply
#8

Nгo й isso... vocк leu o tуpico todo ?
Reply
#9

pawn Code:
new nome[25];
GetPlayerName(playerid,nome,25);
impossivel n dar certo
Reply
#10

lol..

pawn Code:
if( strcmp( key , "LU" , true ) == 0 )
                    {
                        val = ini_GetValue( Data );
                        strmid(PlayerInfo[playerid][pLastLogin], val, 0, strlen(val)-1, 255);
                        new arquivo[128];
                        format(arquivo, sizeof(arquivo), "ORG Arquivos/Org%d.cfg",GetPlayerOrg(playerid));
                        for(new i = 0; i < 24; i++)
                        {
                            if(strcmp(InfoOrg[i][Lider], PlayerName(playerid), true) ==0) //line 14670
                            {
                                InfoOrg[i][LastLogin] = PlayerInfo[playerid][pLastLogin];
                                dini_Set(arquivo, "LastLogin", InfoOrg[i][LastLogin]);
                            }
                        }
                    }
Reply
#11

eita, eu jб tinha tentado isso e nгo deu, agora eu fiz e deu :S
valeu ae, +REP

@Edit
apareceu que jб dei reputation...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)