I wanted to summon up a healthkit whenever I wanted to but this simple script isn't working.
procedure OnPlayerSpeak(ID: byte; Text: string);
begin
if (Text = '!health') then begin
SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16);
end;
end;
I simply can't figure out how to fix it, because When I try running it, my dedicated server crashes on start.
I have implemented the script correctly in a different folder, and made an 'Includes.txt' with the name of the pas file.