Payday problem
#2

pawn Код:
public PayDay()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][Exp] != 5)
{
PlayerInfo[i][Exp] += 1;
GameTextForPlayer(i,"PayDay",1000,1);
return 1;
}
SetPlayerScore(i,GetPlayerScore(i)+1);
PlayerInfo[i][Exp] = 0;
}
}
}
}
I don't understand why you were checking if EXP was more or equals 6 when it can never be 6, because when it hits 5, it resets?
Anyway, that code should work.

https://sampwiki.blast.hk/wiki/Control_Structures#Operators
Reply


Messages In This Thread
Payday problem - by bartje01 - 26.05.2010, 20:33
Re: Payday problem - by Joe_ - 26.05.2010, 20:39
Re: Payday problem - by bartje01 - 26.05.2010, 20:41
Re: Payday problem - by Joe_ - 26.05.2010, 20:48
Re: Payday problem - by bartje01 - 26.05.2010, 20:49
Re: Payday problem - by bartje01 - 26.05.2010, 20:55
Re: Payday problem - by Joe_ - 26.05.2010, 20:56
Re: Payday problem - by bartje01 - 26.05.2010, 20:58

Forum Jump:


Users browsing this thread: 1 Guest(s)