6jorn_
Member
Code:
function main()
wait(5000)
SampRegisterChatCommand("search",cmd)
end
function cmd(arg)
if #arg == 0 then
sampAddChatMessage(string.format("/search id"),FF0000)
else
ped = sampGetCharHandleBySampPlayerId(arg)
positionX, positionY, positionZ = getCharCoordinates(ped)
sampAddChatMessage(string.format("Coordinates are: ",positionX,positionY,positionZ),FF0000)
end
end
What have I done wrong?
moonloader.log
it loads fine untill me getting the chars of an ID
Code:
[18:47:53.947799] (error) PlayerFinder: opcode '00A0' call caused an unhandled exception
stack traceback:
[C]: in function 'getCharCoordinates'
...ckstar Games\GTA San Andreas\moonloader\playerFinder.lua:21: in function <...ckstar Games\GTA San Andreas\moonloader\playerFinder.lua:16>
[18:47:53.948812] (error) PlayerFinder: Script died due to an error. (078B1F3C)