Jump to content
  • 0

pomoc Odpočet


mark

Dotaz

Čaute potreboval by som poradiť. Mám spravený odpočet že keď zapne misiu tak sa mu spustí odpočet a zečne odpičítavať.

Ale keď som na serveri sám tak to ukazuje pohode ale keď misiu už robíme dvaja tak ten odpočet raz ukazuje môj čas a potom preskakuje na toho druhého. Tu je kod:

 

 

public OdpocetSS(playerid)
{
new string2[60];
if(odpocitavanie[playerid] > 0)
{
format(string2, 60, "~b~Cas: ~r~%d ~b~Sekund",odpocitavanie[playerid]);
TextDrawSetString(TDOdpocet,string2);
TextDrawShowForPlayer(playerid,TDOdpocet);
odpocitavanie[playerid]--;
SetTimerEx("OdpocetSS",1000,false,"i",playerid);
}else{
TextDrawHideForPlayer(playerid,TDOdpocet);
DisablePlayerRaceCheckpoint(playerid);
}
}

 

A v poslednom cp mam:

 

odpocitavanie[playerid]=0;
TextDrawHideForPlayer(playerid,TDOdpocet);

 

Ďakujem za pomoc.

Link to comment
Share on other sites

5 odpovědí na tuto otázku

Recommended Posts

  • 0

premenu TDOdpocet musíš mať TDOdpocet[MAX_PLAYERS] a použitie - TDOdpocet[playerid]

pretože string ukladaš do jednej premeny a tym padom to preskakuje takže musiš to mať pre každeho hrača zvlášť.

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...