function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand("spawn", spawn)
while true do
wait(0)
end
end
function spawn(id)
if id == "" then
sampAddChatMessage("Вы не ввели ID", -1)
else
x, y, z = getCharCoordinates(PLAYER_PED)
result, ped = sampGetCharHandleBySampPlayerId(id)
if result then
setCharCoordinates(ped, x, y, z)
end
end
end