Black2 Posted June 7, 2015 Share Posted June 7, 2015 Hello,I created a resource team to give the player as I do to give team when playing "REGISTER" ? Link to comment
Noki Posted June 7, 2015 Share Posted June 7, 2015 There is currently no event that is triggered upon player registration. But say you wanted to create a custom event for use when someone registers using the "register" command, you could use this (not tested, and not guaranteed to work, but instead provided as a basis to be worked upon): addEvent("onPlayerRegister", true) addEventHandler("onPlayerRegister", root, function (source) setPlayerTeam(source, getTeamFromName("foo")) end ) function handleCommand(cmd) -- This will work when they use register, nothing to check if they actually did it successfully if (cmd == "register") then -- We trigger the event and pass the source (the client who actually wrote the command) triggerEvent("onPlayerRegister", source) end end addEventHandler("onPlayerCommand", root, handleCommand) 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