Jump to content
  • 0

pomoc Najlepší vyhráva


martinatoor

Dotaz

Zdravim chcel by som sa vás opitať ako by ste riešili tuto situaciu..

kto ziska najviac bodov vyhraca

ake kody by ste použili na vyhladavanie kto ma najväčšie score ?? a potom by ho to vpisalo do chatu že mal najviac bodov a vyhral

preto sa pitam lebo ja by som to možno aj urobil ale asi s tou najtachšiu cestov tak čakam čady

DAKUJEM :d

Link to comment
Share on other sites

16 odpovědí na tuto otázku

Recommended Posts

  • 0

new najvyssie;
new string[120];
for(new io = bodik[io];io--
{
if(IsPlayerConnected(io))
{
najvyssie = bodik[io];
format(string, sizeof(string),"najväčši killer mal: %d KILLS",najvyssie);
SendClientMessageToAll(COLOR_RED, string);
break;
}
}

a vždy to napiše najväčši killer mal: 1 KILLS aj ked score je uplne ine

Link to comment
Share on other sites

  • 0
Pretoze io je ID, a mas to break. Tak automaticky povie "najvacsi killer mal: 1 KILLS"

new najvyssie;

new string[120];

for(new io = bodik[io];io--;)

{

if(IsPlayerConnected(io))

{

najvyssie = bodik[io];

format(string, sizeof(string),"najväčši killer mal: %d KILLS",najvyssie);

SendClientMessageToAll(COLOR_RED, string);

break;

}

}

mno ano srry ja som mal preklep ja už ani nerozmyšlam mno stava sa ale ono to aj tak piše raz 1 a raz nula žiaden počet killov tam nieje

Link to comment
Share on other sites

  • 0
zmaž break

zavadza ti ? lebo ja ho nemam dôvod dať preč neboj sa on bude bežať :d NTP mi može kuriť *****

 

Používáš něco čemu nerozumíš. Oni mají pravdu.

Link to comment
Share on other sites

  • 0

new skore mazplayers. bestplayer

for (new i. i < max hracov. i )

{

if(skore i > skore bestplayer) bestplayer = i

new string 64)

format(string.64. Najlepsi hrac s. getplayername(b...bestplayer)) tito patri za cyklus

}

Link to comment
Share on other sites

  • 0
zmaž break

zavadza ti ? lebo ja ho nemam dôvod dať preč neboj sa on bude bežať :d NTP mi može kuriť *****

 

Používáš něco čemu nerozumíš. Oni mají pravdu.

ja som mu poradil celý code ktorý upravujete :) ale ok ..

Link to comment
Share on other sites

  • 0

Aj tak to je sračka čo ste mu pordaili, bol som na mobile tak t uje celý kód...

new kills[MAX_PLAYERS], bestplayer_id;
for(new i, i < MAX_PLAYERS, i++)
{
       if(kills[i] > kills[bestplayer_id]) bestplayer_id = i;
}
new string[64];
format(string,sizeof(sting),"Najlepší hráč v počte zabití je: %s",GetPlayerName(...,bestplayer_id));
SendClientMessageToAll(farba,string);

 

jednoduché a prehľadné

Link to comment
Share on other sites

  • 0
Aj tak to je sračka čo ste mu pordaili, bol som na mobile tak t uje celý kód...

new kills[MAX_PLAYERS], bestplayer_id;
for(new i, i < MAX_PLAYERS, i++)
{
       if(kills[i] > kills[bestplayer_id]) bestplayer_id = i;
}
new string[64];
format(string,sizeof(sting),"Najlepší hráč v počte zabití je: %s",GetPlayerName(...,bestplayer_id));
SendClientMessageToAll(farba,string);

 

jednoduché a prehľadné

jj len toto treba nahradiť

for(new i; i <= MAX_PLAYERS; i++)

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...