Bug with publics
#1

When i use in public -= 1 or -- for one players,vehicles then take 41 of time,fuel and other.
That is in all publics.In this code take 41 seconds of jailtime.When i use stock then is ok,then can't create timer.
Sry for English.
Код:
public IzlazakT()
{
new string[128];
     for(new i = 0; i < MAX_PLAYERS; i++)
        {
		if(PlayerInfo[i][pJailed] == 2)
	    {
            if(PlayerInfo[i][pJailTime] > 0)
	    	{
                PlayerInfo[i][pJailTime] -= 1;
	    	}
 	        if(PlayerInfo[i][pJailTime] == 0)
		    {
                PlayerInfo[i][pJailTime] = 0;
                SetPlayerInterior(i, 0);
		        PlayerInfo[i][pJailed] = 0;
                SetPlayerPos(i, 1767.88, -1613.29, 13.52);
                return 1;
            }
		}
		if(PlayerInfo[i][pJailed] == 1)
	    {
            if(PlayerInfo[i][pJailTime] > 0)
	    	{
                PlayerInfo[i][pJailTime] -= 1;
	    	}
 	        if(PlayerInfo[i][pJailTime] == 0)
		    {
                PlayerInfo[i][pJailTime] = 0;
                SetPlayerInterior(i, 0);
		        PlayerInfo[i][pJailed] = 0;
		        ClearCrime(i);
		        SendClientMessage(i, COLOR_WHITE,"Pusteni ste iz zatvora.");
				SendClientMessage(i, COLOR_WHITE,"Sledeci put razmislite prije nego sto pocinite zlocin.");
				format(string, sizeof(string), "~g~Pusteni ste iz zatvora");
                SetPlayerPos(i, 1767.88, -1613.29, 13.52);
                return 1;
            }
		}
	}
return 1;
}
Reply
#2

BUMP!
Reply
#3

cant understand U !!

what ur trying to achieve ??
ur talking about some fuel when all there is is some pJailTime
Reply
#4

Bug with timers,i set timer on 1000 and it take of players 41 seconds(jailtime)
Reply
#5

how u set the timer house u set pJailed
Reply
#6

unjailtimer = SetTimer("IzlazakT", 1000, 1);
Reply
#7

and PlayerInfo[i][pJailed]
Reply
#8

Код:
public IzlazakT()
{
new string[128];
     for(new i = 0; i < MAX_PLAYERS; i++)
        {
		if(PlayerInfo[i][pJailed] == 2)
	    {
            if(PlayerInfo[i][pJailTime] > 0)
	    	{
                PlayerInfo[i][pJailTime] -= 1;
	    	}
 	        if(PlayerInfo[i][pJailTime] == 0)
		    {
                PlayerInfo[i][pJailTime] = 0;
                SetPlayerInterior(i, 0);
		        PlayerInfo[i][pJailed] = 0;
                SetPlayerPos(i, 1767.88, -1613.29, 13.52);
                return 1;
            }
		}
		if(PlayerInfo[i][pJailed] == 1)
	    {
            if(PlayerInfo[i][pJailTime] > 0)
	    	{
                PlayerInfo[i][pJailTime] -= 1;
	    	}
 	        if(PlayerInfo[i][pJailTime] == 0)
		    {
                PlayerInfo[i][pJailTime] = 0;
                SetPlayerInterior(i, 0);
		        PlayerInfo[i][pJailed] = 0;
		        ClearCrime(i);
		        SendClientMessage(i, COLOR_WHITE,"Pusteni ste iz zatvora.");
				SendClientMessage(i, COLOR_WHITE,"Sledeci put razmislite prije nego sto pocinite zlocin.");
				format(string, sizeof(string), "~g~Pusteni ste iz zatvora");
                SetPlayerPos(i, 1767.88, -1613.29, 13.52);
                return 1;
            }
		}
	}
return 1;
}
public is ok when i use cmd
Код:
    if(strcmp(cmd, "/js", true) == 0)
	{
	IzlazakT();
	return 1;
	}
then take 1seconds of jailed players
Reply
#9

u don't show full code !
u can be setting the timer inside a loop !

and u still don't show how you add the amount of seconds into pJailed
Reply
#10

Fixed,lock this topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)