Hi
I have something like this:
var
X, Y: Single;
function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
if Text = '/test' then begin
X := GetPlayerStat(1, 'X');
Y := GetPlayerStat(1, 'Y');
MovePlayer(1, GetPlayerStat(2, 'X'), GetPlayerStat(2, 'Y'));
MovePlayer(2, X, Y);
end;
Result := false;
end;
It should swap places with ID 1 player and ID 2 player but it doesn't.
Player 1 is teleported to player 2 but player 2 is teleported to random place.
What's the problem?