Atton Posted July 29, 2013 Share Posted July 29, 2013 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
bandi94 Posted July 29, 2013 Share Posted July 29, 2013 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
Atton Posted July 30, 2013 Author Share Posted July 30, 2013 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
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