devil666 Posted March 18, 2009 Share Posted March 18, 2009 Im trying to make a restart function for a race where when someone hits the finish line it will count down from 20 then restart the race resource but idk what is wrong i have the count down working but i can get the restart resource to work someone please help me! here is what i have so far! function RestartRace (Restart) if (Restart > 0) then outputChatBox(tostring(Restart), getRootElement(), 255, 255, 255) setTimer(RestartRace, 1000, 1, Restart-1) else outputChatBox("Restarting Race Now!!!!", getRootElement(), 255, 255, 255) triggerServerEvent ( "aResource", getLocalPlayer(), "allgates", "restart" ) end end Link to comment
50p Posted March 18, 2009 Share Posted March 18, 2009 First of all, use code tag to make the script easier to read for us. Secondly, make it server-side. Thirdly, use "changeGamemode" (exported function from mapmanager resource). 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