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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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
Jaysds1 Posted May 17, 2012 Posted May 17, 2012 nice, and now it works (Speaking for MOJRM-511) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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 http://mojrm511.x10.mx msn: [email protected] my server ip: 176.9.40.71:22779 -------------------------------------- 2012 updated--------
Jaysds1 Posted May 17, 2012 Posted May 17, 2012 np, BTW can you unban me please My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Castillo Posted May 17, 2012 Posted May 17, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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 http://mojrm511.x10.mx msn: [email protected] my server ip: 176.9.40.71:22779 -------------------------------------- 2012 updated--------
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