27.05.2011, 05:07
Hola, tengo un problem con este codigo:
Tengo el timer que se repita cada segundo, las variables van subiendo bien, con el format se ve, pero el tiempo no cambia :S, saben que tiene de malo?
pawn Код:
new HoraGame = 4;
new MinutoGame= 59;
new SegundoGame= 50;
SetTimer("ChangeTime", 1000, 1);
forward ChangeTime();
public ChangeTime()
{
SegundoGame ++;
new s[125];
if(HoraGame >= 24) { HoraGame = 0; MinutoGame = 0; SegundoGame = 0; }
if(MinutoGame >= 60) { MinutoGame = 0; HoraGame += 1; }
if(SegundoGame >= 60) { SegundoGame = 0; MinutoGame += 1; }
for(new PlxD = 0; PlxD < MAX_PLAYERS; PlxD++) {
if(IsPlayerConnected(PlxD)) {
SetPlayerTime(PlxD, HoraGame, MinutoGame);
format(s, sizeof(s), "El Tiemp cambio a %d : %d : %d!", HoraGame, MinutoGame, SegundoGame);
SendClientMessage(PlxD, 0xFFFFFFFF, s); } }
}