Timic Posted March 21, 2011 Posted March 21, 2011 Hello, I saw in debug, it was bad argument. Why O_O? function checkPlayerOnJoin(player) if not (string.find(getPlayerName(source),"[TAG]")) then redirectPlayer(playerSource, "some ip", tonumber(some port)) --redirect the player end end addEventHandler("onPlayerJoin", getRootElement(), checkPlayerOnJoin) P.S: I put IP and port but anyway, it won't work Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
proracer Posted March 21, 2011 Posted March 21, 2011 1. What should script do? 2. Where is the error?
Timic Posted March 21, 2011 Author Posted March 21, 2011 Well, if is without [TAG] tag then should redirect it. Bad argument at redirect player! Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
Moderators Zango Posted March 21, 2011 Moderators Posted March 21, 2011 you would want to change playerSource in redirectPlayer to source
Timic Posted March 21, 2011 Author Posted March 21, 2011 Thanks, it works Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
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