Szerző Téma: Legnagyobb pénzû játékos megállapítása / Legnagyobb pontú játékos megállapítása  (Megtekintve 1218 alkalommal)

dexi

  • Vendég
+2 Show voters
Készítõ: Fl0rian
 
stock
GetMaxMoneyPlayer( )
{
new func_Money;
new func_ID;
for( new playerid = 0; playerid < MAX_PLAYERS; playerid++ )
{
if( IsPlayerConnected(playerid) )
{
   if( func_Money < GetPlayerMoney(playerid) )
   {
       func_Money = GetPlayerMoney(playerid);
      func_ID = playerid;
   }
}
}
return func_ID;
}

 

stock
GetMaxScorePlayer( )
{
new func_Score;
new func_ID;
for( new playerid = 0; playerid < MAX_PLAYERS; playerid++ )
{
if( IsPlayerConnected(playerid) )
{
   if( func_Score < GetPlayerScore(playerid) )
   {
       func_Score = GetPlayerScore(playerid);
      func_ID = playerid;
   }
}
}
return func_ID;
}

 
Unatkoztam ezért összedobtam ezeket a kis kódokat..

0 Show voters
Pont ez kellet, köszönöm!

Kory

0 Show voters
Tényleg nem nagy munka,de hasznos.
További jó scriptelést!

0 Show voters
Minek MAX_PLAYERS (500)-ig ciklus, amikor még a GetMaxPlayers() (a szerverkonfigurációban meghatározott férõhelyek száma)-ig is sok?

0 Show voters
Tényleg nem nagy munka,de hasznos.
További jó scriptelést!

0 Show voters
Minek MAX_PLAYERS (500)-ig ciklus, amikor még a GetMaxPlayers() (a szerverkonfigurációban meghatározott férõhelyek száma)-ig is sok?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal