Jump to content

command value problem


Overkillz

Recommended Posts

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.

Link to comment

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 by Guest
Link to comment
    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) 

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...