help bugged
#1

Need help my count down timer

i want numbers will not go in "-" sign instead if they are 0 and the other are 0 they will not be changed
pawn Код:
public OnPlayerTimeUpdate(playerid)
{
   
    pData[playerid][pSeconds] =- 1;
    if(pData[playerid][pSeconds] == 0)
    {
        pData[playerid][pMinutes] =- 1;
        pData[playerid][pSeconds] =  60;
    }
    if(pData[playerid][pMinutes] == 0)
    {
        pData[playerid][pHours] =- 1;
        pData[playerid][pMinutes] = 60;
    }
    if(pData[playerid][pHours] == 0)
    {
        pData[playerid][pDays] =- 1;
        pData[playerid][pHours] = 24;
    }
    if(pData[playerid][pDays] == 0)
    {
        pData[playerid][pWeeks] =- 1;
        pData[playerid][pDays] = 7;
    }
    if(pData[playerid][pWeeks] == 0)
    {
        pData[playerid][pMonths] =- 0;
        pData[playerid][pWeeks] = 7;
    }
    if(pData[playerid][pMonths] == 0)
    {
        pData[playerid][pMonths] = 12;
        pData[playerid][pYears] =- 1;
    }
    if(pData[playerid][pYears] == 0 && pData[playerid][pMonths] == 0 && pData[playerid][pWeeks] == 0 && pData[playerid][pDays] == 0 && pData[playerid][pHours] == 0 && pData[playerid][pMinutes] == 0 && pData[playerid][pSeconds] == 0)
    {
        SCM(playerid,C_RED,"You have died because you have ran out of time");
        return Kick(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
help bugged - by RicaNiel - 04.05.2012, 09:51
Re: help bugged - by Accord - 04.05.2012, 10:07
Re: help bugged - by RicaNiel - 04.05.2012, 10:25
Re: help bugged - by Accord - 04.05.2012, 10:28
Re: help bugged - by RicaNiel - 04.05.2012, 10:32

Forum Jump:


Users browsing this thread: 1 Guest(s)