jason38 Posted February 29, 2020 Share Posted February 29, 2020 Witam! gdzie muszę uzupełnić, gdzie wpisac nazwe skryptu mojego zeby działało za ta komendą function startTheResource ( thePlayer, command, resourceName ) if ( resourceName ) then -- Check if they specified a resource name local resource = getResourceFromName ( resourceName ) -- Get the resource local start = startResource ( resource ) -- Start the resource if ( start ) then -- If it was successfully started... outputChatBox ( resourceName .. " was started successfully.", thePlayer, 255, 0, 0 ) else -- If it wasn't successfully started... outputChatBox ( "This resource doesn't exist.", thePlayer, 255, 0, 0 ) end else -- If they didn't put a resource name... outputChatBox ( "Please specify a resource to start.", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "resource-start", startTheResource ) -- Make it trigger when somebody types "/resource-start" https://wiki.multitheftauto.com/wiki/StartResource Link to comment
value Posted April 14, 2020 Share Posted April 14, 2020 Nazwę skryptu określasz w tej linijce local resource = getResourceFromName ( resourceName ) -- Get the resource Jest to resourceName, w obecnej chwili jest to pobieranie z argumentu komendy, tak więc wystarczy, że wpiszesz /resource-start nazwa_zasobu Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now