mrvicio Posted November 7, 2011 Share Posted November 7, 2011 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 How can i do that? Link to comment
bandi94 Posted November 7, 2011 Share Posted November 7, 2011 debugscript 3 is only for admin's so your resource need's admin right's to execute that command hander Link to comment
FatalTerror Posted November 7, 2011 Share Posted November 7, 2011 I write this via tel... Test it ^^ addEventHandler("onPlayerLogin", getRootElement(), function(player) executeCommandHandler(player, "debugscript", 3) end) Link to comment
Castillo Posted November 7, 2011 Share Posted November 7, 2011 Wrong, FatalTerror, 'source' is the player event of onPlayerLogin. addEventHandler("onPlayerLogin", getRootElement(), function() executeCommandHandler(source, "debugscript", 3) end) Link to comment
Cadu12 Posted November 7, 2011 Share Posted November 7, 2011 bool executeCommandHandler ( string commandName, player thePlayer, [ string args ] ) Its: executeCommandHandler("debugscript", source, 3) Link to comment
mrvicio Posted November 7, 2011 Author Share Posted November 7, 2011 addEventHandler("onPlayerLogin", getRootElement(), function() executeCommandHandler(source, "debugscript", 3) end) that don't give any errors, but it doesn't work either Link to comment
BinSlayer1 Posted November 7, 2011 Share Posted November 7, 2011 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 Link to comment
mjau Posted November 7, 2011 Share Posted November 7, 2011 addEventHandler("onPlayerLogin", getRootElement(), function() executeCommandHandler("debugscript",source, "3") end) Here you go Link to comment
SDK Posted November 7, 2011 Share Posted November 7, 2011 executeCommandHandler doesn't work with builtin commands, only with commands added with addCommandHandler. @mrvicio, it's not possible now afaik Link to comment
mrvicio Posted November 8, 2011 Author Share Posted November 8, 2011 (edited) ahh ok so many thanks to SDK and all who try to help me! Edited November 8, 2011 by Guest Link to comment
Castillo Posted November 8, 2011 Share Posted November 8, 2011 Please, speak only English on this forum, use the "Spanish" section to speak in your language. 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