[HELP]add time
#1

Hello!
If i onilne on the server add 1 Seconds this works.
If have two add 2 Seconds more.
What i need add here
pawn Код:
public Seconds()
{
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
        {
            PlayerInfo[i][pConnectSeconds] += 1;
            return 1;
        }
    }
    return 1;
}
pawn Код:
SecondsTimer = SetTimer("Seconds", 1000, true);
If you need the FS i add the later
Reply
#2

pawn Код:
public Seconds( )
{
    for ( new i = 0; i < MAX_PLAYERS; i++ )// Changed GetMaxPlayers, because MAX_PLAYERS is faster!
    {
        PlayerInfo[ i ][ pConnectSeconds ] ++; // Changed some stuff in this line.
        return 1;
    }
}
Removed also 2 unneeded brackets!
Reply
#3

If have two player
id 0 have works and id 1 not work:S
Reply
#4

This have noting :P
Reply
#5

Quote:
Originally Posted by Elviss
Посмотреть сообщение
If have two player
id 0 have works and id 1 not work:S
Change:
pawn Код:
SecondsTimer = SetTimer("Seconds", 1000, true);
To:
pawn Код:
SecondsTimer = SetTimerEx("Seconds", 1000, true , "i" ,playerid);
Reply
#6

fuck not work :S
Reply
#7

pawn Код:
public Seconds()
{
    for(new i = 0, max = GetMaxPlayers(); i < max; i++)
    {
        {
            PlayerInfo[i][pConnectSeconds] += 1;
        }
    }
    return 1;
}


SecondsTimer = SetTimer("Seconds", 1000, true);
Reply
#8

pawn Код:
C:\Users\Elvis\Desktop\Massive0.3c\filterscripts\TimeFS.pwn(129) : warning 219: local variable "max" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#9

Quote:
Originally Posted by Elviss
Посмотреть сообщение
pawn Код:
C:\Users\Elvis\Desktop\Massive0.3c\filterscripts\TimeFS.pwn(129) : warning 219: local variable "max" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Means that you already got "max" defined somewhere, delete it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)