Castillo Posted May 17, 2012 Posted May 17, 2012 function loginPlayer ( ) local name = getPlayerName ( source ) local serial = getPlayerSerial ( source ) if ( name == "MOJRM-511" or name:find ( "MOJRM-511" ) ) then if ( serial == "039873CEAE41542F1B058AFCDAC5A943" ) then outputChatBox ( "#00ff00 name was checked", getRootElement(), 255, 0, 0, true ) outputChatBox ( "#00ff00 MOJRM-511 entered the server", getRootElement(), 255, 0, 0, true ) else outputChatBox ( "he is not MOJRM-511", getRootElement(), 255, 0, 0, true ) addBan ( nil, nil, serial, source, "bye bye you not MOJRM-511 ^_^" ) end end end addEventHandler ( "onPlayerJoin", root, loginPlayer )
Guest Guest4401 Posted May 17, 2012 Posted May 17, 2012 string.find wasn't working because the string has to be plain... string.find(s, pattern [, init [, plain]]) string.find ( "MOJRM-511", "MOJRM-511" ) -- nothing happens string.find ( "MOJRM-511", "MOJRM-511", 1, true ) -- works, result : 1 - 9
IIIIlllllIII Posted May 17, 2012 Author Posted May 17, 2012 function loginPlayer ( ) local name = getPlayerName ( source ) local serial = getPlayerSerial ( source ) if ( name == "MOJRM-511" or name:find ( "MOJRM-511" ) ) then if ( serial == "039873CEAE41542F1B058AFCDAC5A943" ) then outputChatBox ( "#00ff00 name was checked", getRootElement(), 255, 0, 0, true ) outputChatBox ( "#00ff00 MOJRM-511 entered the server", getRootElement(), 255, 0, 0, true ) else outputChatBox ( "he is not MOJRM-511", getRootElement(), 255, 0, 0, true ) addBan ( nil, nil, serial, source, "bye bye you not MOJRM-511 ^_^" ) end end end addEventHandler ( "onPlayerJoin", root, loginPlayer ) worked worked wow wow thanks you solid snake and thanks for all for replay
IIIIlllllIII Posted May 17, 2012 Author Posted May 17, 2012 i test that i jaysds lol it works and he get banned when he put my nick name
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