pOMOC /count komanda problem

Započeo Otisao s Foruma!, Januar 08, 2012, 18:02:59 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Kad mi odbrojava prvi broj bude na sred ekrana a kada dalje odbrojava broj bude dole kako da bude samo u sred ekrana.

if(strcmp(cmdtext,"/count",true) == 0)
   {
   if (PlayerInfo[playerid][pAdmin] >= 2)
   {
       new Float:X, Float:Y, Float:Z;
      new pName[30];
      if (auts == false)
      {
         auts = true;
         GetPlayerName(playerid, pName, 30);
         format(string, 280, "*** %s je zapoceo brojanje.", pName);
         SendClientMessageToAll(COLOR_LIGHTBLUE, string);
         foreach (Player, i)
         {
               GameTextForPlayer(i, "~n~~n~~n~~n~~n~~g~-~y~ 5 ~g~-",1000,3);
               GetPlayerPos(i, X,Y,Z);
            }
            SetTimer("count4",1000,0);
            SetTimer("count3",2000,0);
            SetTimer("count2",3000,0);
            SetTimer("count1",4000,0);
            SetTimer("countgo",5000,0);
            SetTimer("stop",6000,0);
      }
[[/center]
DgL <3
Otisao s Foruma zz


To moraš srediti u timerima.
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

al kako napisi mi ako znash  8)
[[/center]
DgL <3
Otisao s Foruma zz



Citat: [TG]$--L84S--$ poslato Januar 08, 2012, 23:25:12 POSLE PODNE
Citat: cfg:) poslato Januar 08, 2012, 20:57:45 POSLE PODNE
al kako napisi mi ako znash  8)
daj nam count4 count3 itd... pa ti sredim...

pa to je sve valjda od counta ? sto sam dao gore
[[/center]
DgL <3
Otisao s Foruma zz


Mislimo na "public"-e od tih timera. To što si stavio je pokretanje timera , što je jako neoptimizirano i doće ti do crashanja na serveru samo tako ;)
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

jeli ovo ti tajmeri
new addtimer = 60000;
new roadblocktimer = 0;
new drogatimer;
new DropValueTimer;
new cashboxstarttimer;
new tracetimer;
new adtimer;
new CheckStatusTimer;
new synctimer;
new newmistimer;
new unjailtimer;
new turftimer;
new pickuptimer;
new idletimer;
new productiontimer;
new SetWorld;
new accountstimer;
new checkgastimer;
new stoppedvehtimer;
new checkcarhealthtimer;
new kradjatimer;
new oborentimer;
[[/center]
DgL <3
Otisao s Foruma zz



Citat: cfg:) poslato Januar 09, 2012, 01:22:44 PRE PODNE
jeli ovo ti tajmeri
new addtimer = 60000;
new roadblocktimer = 0;
new drogatimer;
new DropValueTimer;
new cashboxstarttimer;
new tracetimer;
new adtimer;
new CheckStatusTimer;
new synctimer;
new newmistimer;
new unjailtimer;
new turftimer;
new pickuptimer;
new idletimer;
new productiontimer;
new SetWorld;
new accountstimer;
new checkgastimer;
new stoppedvehtimer;
new checkcarhealthtimer;
new kradjatimer;
new oborentimer;

Napisao sam "public" jel znaš šta je "public" u PAWN-u?
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

eto tajmeri xD

public count4()
{
    new Float:X, Float:Y, Float:Z;
foreach (Player, i)
{
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 4 ~g~-",1000,3);
GetPlayerPos(i, X,Y,Z);
    }
}
public count3()
{
    new Float:X, Float:Y, Float:Z;
foreach (Player, i)
{
    GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
    GetPlayerPos(i, X,Y,Z);
    }
}
public count2()
{
    new Float:X, Float:Y, Float:Z;
foreach (Player, i)
{
    GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 2 ~g~-",1000,3);
    GetPlayerPos(i, X,Y,Z);
    }
}
public count1()
{
    new Float:X, Float:Y, Float:Z;
foreach (Player, i)
{
    GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 1 ~g~-",1000,3);
    GetPlayerPos(i, X,Y,Z);
    }
}
public countgo()
{
    new Float:X, Float:Y, Float:Z;
foreach (Player, i)
{
    GetPlayerPos(i, X,Y,Z);
    GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~]~g~-~g~START~g~-~y~]~g~-",1000,3);
[[/center]
DgL <3
Otisao s Foruma zz


Kao prvo ni u jednom publicu ti ne trebaju varijable x,y,z zato što ih nigdje ne koristiš , ne trebaš foreach zato što postoji funkcija GameTextForAll. I tekst ti nije na sredini zato što ga tako nisi sredio u funkcijama GameText. Makar ti preporučavam da ne koristiš to zato što će ti se doć do čestih crasheva na serveru.
Poslednja Izmena: Januar 09, 2012, 01:50:37 PRE PODNE od Get busy living or Get busy dying
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

Ok hvala ti  ;)
[[/center]
DgL <3
Otisao s Foruma zz