Jump to content

how can i auto start debugscript on start?


mrvicio

Recommended Posts

Posted

hi all, im trying to get the "debugscript 3" inmediatly after connect, how can i do this?

i have tried on client side:

executeCommandHandler ( "debugscript","3") 
  
--and 
  
executeCommandHandler ( "debugscript 3") 

and on server side

  
addEventHandler ( "onPlayerJoin", getRootElement(), function()  
     
executeCommandHandler(source,"debugscript 3") 
--and 
executeCommandHandler(source,"debugscript", "3") 
end) 
  

and any of that functions works :S

How can i do that?

Posted

Wrong, FatalTerror, 'source' is the player event of onPlayerLogin.

addEventHandler("onPlayerLogin", getRootElement(), 
function() 
executeCommandHandler(source, "debugscript", 3) 
end) 

Posted

bool executeCommandHandler ( string commandName, player thePlayer, [ string args ] )

Its:

  
executeCommandHandler("debugscript", source, 3) 
  

Posted
addEventHandler("onPlayerLogin", getRootElement(), 
function() 
executeCommandHandler(source, "debugscript", 3) 
end) 

that don't give any errors, but it doesn't work either :S

Posted

mrvicio if you read what Cadu12 told you, you would know it's

executeCommandHandler("debugscript",source, "3")

the order matters (check the wiki) + the argument must be a string so use "3" not 3.

although i'm not sure executeCommandHandler will work with this built-in command

Posted
addEventHandler("onPlayerLogin", getRootElement(), 
function() 
executeCommandHandler("debugscript",source, "3") 
end) 

Here you go

Posted

executeCommandHandler doesn't work with builtin commands, only with commands added with addCommandHandler.

@mrvicio, it's not possible now afaik

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