What is The Error ?
Or How To Get The Highest Score ?
g_pPlayer <- FindLocalPlayer();
function onScriptLoad()
{
// Start
local Pos = VectorScreen( ScreenWidth - 148, ScreenHeight - 348 );
local Size = ScreenSize( 130, 208 );
local Text0Pos = VectorScreen( 5, 5 );
local TextSize = ScreenSize( 100, 10 );
Window <- GUIWindow( Pos, Size, "Kings Of The Server" );
Text0 <- GUILabel( Text0Pos, TextSize, "" );
Text0.FontName = "Verdana";
Text0.FontSize = 10;
Window.Colour = Colour(10, 10, 10);
Window.Alpha = 150;
Text0.TextColour = Colour( 255, 255, 255 );
AddGUILayer( Window );
Window.AddChild( Text0 );
// End
}
function onClientRender()
{
local players = GetPlayers();
if (players == 0){ return false; }
players += 10;
local pPlayer = null, id = 0;
while ( id < players )
{
pPlayer = FindPlayer( id );
if ( pPlayer)
{
if(pPlayer.Score >= 500)
{
Text0.Text = "*System* "+pPlayer.Name+" >> [ King ].";
}
}
id += 1;
}
}