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