[pomoc] stats

Započeo warning, Februar 21, 2012, 15:46:39 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:BU

Detaljan opis problema:pokusavam da napravim stats u TD ali da se lista stats na strelicu na tastaturi...uspeo sam napraviit prvu stranicu ali kad hocu da prebacim na drugu nista se ne desava...pa nzm o cemu se radi :S

Dio skripte:
if (PRESSED(KEY_ANALOG_RIGHT))
          {
        if(IsPlayerConnected(playerid))
           {
           if(pokazanistatsi[playerid] == 1)
            {
        tu sklanjam prejasnji TD i pokzujem novi...
     }
     }
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):

sa strelicama je malo zeznuto, koristi ovo

new Keys, ud, lr;
if(lr > 0)
{
ovo je strelica desno, stavi ovde skriptu koju hoces
}
if(lr < 0)
{
ovo je strelica levo, stavi ovde skriptu koju hoces
}

samo zapamtim ovo nesmes da koristis pod OnPlayerKeyStateChange, vec u nekom drugom stocku, komandi itd...

trebao bi uz ovo da koristis i tajmer koj se stalno ponavlja...

evo kako sam uradio...napravio sam public StatsImovina(playerid) i napravio sam timer kao sto si reko u OnGameModeInit:
SetTimer("StatsImovina",1000,1);

i pod taj publuc kao sti si mi rekao ovako sam uradio:
public StatsImovina(playerid)
{
     new Keys, ud, lr;
     if(lr > 0)
     {
     if(IsPlayerConnected(playerid))
           {
           if(pokazanistatsi[playerid] == 1)
            {
        TextDrawHideForPlayer(playerid, Textdraw0s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw1s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw2s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw3s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw4s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw5s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw6s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw7s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw8s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw9s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw10s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw11s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw12s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw13s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw14s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw15s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw16s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw17s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw18s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw19s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw20s[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw21s[playerid]);
    TextDrawDestroy(Textdraw0s[playerid]);
    TextDrawDestroy(Textdraw1s[playerid]);
    TextDrawDestroy(Textdraw2s[playerid]);
    TextDrawDestroy(Textdraw3s[playerid]);
    TextDrawDestroy(Textdraw4s[playerid]);
    TextDrawDestroy(Textdraw5s[playerid]);
    TextDrawDestroy(Textdraw6s[playerid]);
    TextDrawDestroy(Textdraw7s[playerid]);
    TextDrawDestroy(Textdraw8s[playerid]);
    TextDrawDestroy(Textdraw9s[playerid]);
    TextDrawDestroy(Textdraw10s[playerid]);
    TextDrawDestroy(Textdraw11s[playerid]);
    TextDrawDestroy(Textdraw12s[playerid]);
    TextDrawDestroy(Textdraw13s[playerid]);
    TextDrawDestroy(Textdraw14s[playerid]);
    TextDrawDestroy(Textdraw15s[playerid]);
    TextDrawDestroy(Textdraw16s[playerid]);
    TextDrawDestroy(Textdraw17s[playerid]);
    TextDrawDestroy(Textdraw18s[playerid]);
    TextDrawDestroy(Textdraw19s[playerid]);
    TextDrawDestroy(Textdraw20s[playerid]);
    TextDrawDestroy(Textdraw21s[playerid]);
            pokazanistatsi[playerid] = 2;
            //--
            TextDrawShowForPlayer(playerid, Textdraw0s[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw1s[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw2s[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw3s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw4s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw5s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw6s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw7s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw8s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw9s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw10s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw11s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw12s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw13s1[playerid]);
    TextDrawShowForPlayer(playerid, Textdraw14s1[playerid]);
     }
     }
     }
    return 1;
}


ali opet ne radi :S tj. /stats radi i pokzuje prvi list ali ne moze se listati dalje ...
Poslednja Izmena: Februar 21, 2012, 16:41:04 POSLE PODNE od warning

nebi trebao da koristis globalni tajmer, vec:

new StatsTajmer[MAX_PLAYERS];

StatsTajmer[playerid] = SetTimerEx("StatsImovina",500,1,"i",playerid);

to stavis pod /stats


i na kraju kad igrac prekine pregled stats-a, koristi

KillTimer(StatsTajmer[playerid]);

odradio sam tako i opet nece da prebaci.. :S

pa ni timere nemožete ubost  :D
SetTimerEx( ... );

ne rasumijem karike? :S ali sve sam odradio i kada kucam /stats prikaze mi se prva stranica kad hocu da prebacim na drugu nista se ne desava -.- pls help me


a sta ne valja u timeru od Maki ?