Overkillz Posted January 29, 2016 Posted January 29, 2016 Hey dear guys, Im having a problem with this easy script IDK why it doesnt work, it is easy to do ... function setGameType(playerSource,commandName,setversus) setGameType ( setversus ) outputChatBox("#dd4040[CW]: #ffffffYou set as Game Type: #ff8800"..setversus, playerSource,255,255,255,true) end addCommandHandler("setvs",setGameType) No errors on debugscript. Regards.
NewbProgramming Posted January 29, 2016 Posted January 29, 2016 (edited) You are replacing the function. Change: function setGameType(playerSource,commandName,setversus) addCommandHandler("setvs",setGameType) to: function cmd_setGameType(playerSource,commandName,setversus) addCommandHandler("setvs",cmd_setGameType) so it doesn't replace the setGameType MTA function. Edited January 29, 2016 by Guest
Nicktim. Posted January 29, 2016 Posted January 29, 2016 function ChangeGameMode(playerSource,commandName,setversus) setGameType ( setversus ) outputChatBox("#dd4040[CW]: #ffffffYou set as Game Type: #ff8800"..setversus, playerSource,255,255,255,true) end addCommandHandler("setvs",ChangeGameMode)
Overkillz Posted January 29, 2016 Author Posted January 29, 2016 Thanks guys, both soultions worked, but, which one was my problem ? The name of function ? It cant be the same as a MTA function ?
Overkillz Posted January 29, 2016 Author Posted January 29, 2016 Thanks dude, I didnt know it. #Request to close topic, Marked as: SOLVED
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