- Dokumentacja
- Funkcje serwera
- restartResource
Funkcja
restartResource
Zatrzymuje i od razu uruchamia zasób, np. po zmianie jego plików.
Składnia
bool restartResource(resource theResource)Argumenty
theResourceresource- Zasób (uchwyt albo nazwa).
Różnice względem MTA:SA
- Tych argumentów z MTA:SA tu nie ma:
bool persistent = false,bool configs = true,bool maps = true,bool scripts = true,bool html = true,bool clientConfigs = true,bool clientScripts = true,bool clientFiles = true
W MTA:SA
restartResource(resource theResource, bool persistent = false, bool configs = true, bool maps = true, bool scripts = true, bool html = true, bool clientConfigs = true, bool clientScripts = true, bool clientFiles = true)Zwraca
true przy powodzeniu.
Przykład
addCommandHandler("restart", function(player, _, name)
if hasObjectPermissionTo(player, "command.restart") then
restartResource(getResourceFromName(name or ""))
end
end)