Szerző Téma: Idõ 12-24  (Megtekintve 521 alkalommal)

Idõ 12-24
« Dátum: 2011. Október 30. - 20:25:06 »
0 Show voters
Hello ugy akarnám megcsinálni hogy 10 percenként váltogassa a szerver idõt 12 és 24 óra között
[pawn]
#include <a_samp>
forward TimeUpdate();
public OnFilterScriptInit()
{
SetTimer(\"TimeUpdate\", 600000, true);
return 1;
}
public TimeUpdate()
{
SetWorldTime(24);
}
else
{
SetWorldTime(12);
 }
}[/pawn]
Így viszont van 1 error xD
Nemtom este van nemtom mit csesztem el?
(15) : error 010: invalid function or declaration
az : else-re

Idõ 12-24
« Válasz #1 Dátum: 2011. Október 30. - 21:04:49 »
+1 Show voters
[pawn]}
else
{[/pawn]
ez mi?
inkább:
[pawn]public TimeUpdate()
{
        new time = random(2);
        switch(time)
       {
         case 1:SetWorldTime(24);
         case 2:SetWorldTime(12);
         }
return 1;
}[/pawn]

Idõ 12-24
« Válasz #2 Dátum: 2011. Október 31. - 09:00:17 »
+1 Show voters
[pawn]#include <a_samp>
public OnFilterScriptInit()
{
SetTimer(\"TimeUpdate\", 10 * 60 * 1000, true);
return 1;
}
forward TimeUpdate();
public TimeUpdate()
{
static
   t_t = 12;      
SetWorldTime((t_t == 12)?(t_t = 24):(t_t = 12));
return 1;
}[/pawn]

Idõ 12-24
« Válasz #3 Dátum: 2011. Október 31. - 10:11:56 »
0 Show voters
Kösz :D
ment a + mind2 õtöknek :D
Este volt már.. xD

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal