Hey, used to use it with Pascal Interpreter, now with Lape can't get it to work, can someone help me? Ty
Simba Code:
program R_GetPlayers_TEST;
{$DEFINE SMART}
{$i AeroLib/AeroLib.Simba}
{$i Reflection/Reflection.Simba}
type
TPlayer2 = record
Name: String;
Level: Integer;
end;
TPlayerArray = Array of TPlayer2;
function R_GetPlayers: TPlayerArray;
var
amount,I, J, _Count, _Player, _Name, _Level: Integer;
Tp: Tpoint;
begin
_Count := SmartGetFieldArraySize(SmartCurrentTarget, 0, 'client.ga', 0);
SetLength(Result, J);
for I := 0 to _Count - 1 do begin
_Player := SmartGetFieldArrayObject(SmartCurrentTarget, 0, 'client.ga', I);
if (_Player <= 0) then
Continue;
Inc(J);
SetLength(Result, J);
end;
amount := J-1; // subtract yourslef
end;
begin
initAL;
Reflect.Setup;
repeat
R_GetPlayers();
Writeln('There are currently '+tostr(amount)+' players');
wait(1000);
until(false);
end.