Jump to content

Issues With Restart System


Atton

Recommended Posts

I am some what new to lua and work off examples quite a lot.

I ran into an issue with making my restart script.

I can keep writing for hours about what I have been doing and why but I really don't know how to fix this.

function Resetd (thePlayer) 
restartResource("Escape_Area51") 
restartResource("zombies") 
outputChatBox("reset") 
end 
addCommandHandler ( "resetdev" , Resetd ) 
  
  
function Startf (thePlayer) 
startResource("Escape_Area51") 
startResource("zombies") 
outputChatBox("Started") 
end 
addCommandHandler ( "startdev" , Startf ) 

Pretty much what this is meant to do is to start 2 scripts and to restart them with a single command.

Link to comment
function Resetd (thePlayer) 
restartResource(getResourceFromName("Escape_Area51")) 
restartResource(getResourceFromName("zombies")) 
outputChatBox("reset") 
end 
addCommandHandler ( "resetdev" , Resetd ) 
  
  
function Startf (thePlayer) 
startResource(getResourceFromName("Escape_Area51")) 
startResource(getResourceFromName("zombies")) 
outputChatBox("Started") 
end 
addCommandHandler ( "startdev" , Startf ) 

Link to comment
function Resetd (thePlayer) 
restartResource(getResourceFromName("Escape_Area51")) 
restartResource(getResourceFromName("zombies")) 
outputChatBox("reset") 
end 
addCommandHandler ( "resetdev" , Resetd ) 
  
  
function Startf (thePlayer) 
startResource(getResourceFromName("Escape_Area51")) 
startResource(getResourceFromName("zombies")) 
outputChatBox("Started") 
end 
addCommandHandler ( "startdev" , Startf ) 

Seems to work thank you very much.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...