John Smith Posted July 13, 2014 Share Posted July 13, 2014 hi im blocking a country but i want to let my friend play(he's an exception) heres my code local countries = { [ "PT" ] = true } local serials = { [ "B1E80345047CC71F1F5C427C581C4D94" ] = true } function paises ( ) local gCountry = exports.admin:getPlayerCountry ( source ) or "N/A" local gSerial = getPlayerSerial ( source ) if ( serials [ gSerial ] ) then outputChatBox("welcome mike",source) else if ( countries [gCountry] then kickPlayer ( source, "Country not allowed." ) end end end addEventHandler ( "onPlayerJoin", getRootElement(), paises ) it doesnt kick him if serial doesnt match,and it doesnt kick him if hes from portugal without that serial please help Link to comment
TAPL Posted July 13, 2014 Share Posted July 13, 2014 Line 16 you didn't close the bracket. Link to comment
Max+ Posted July 13, 2014 Share Posted July 13, 2014 still doesnt work --ServerSide , local countries = { [ "PT" ] = true } local serials = { [ "B1E80345047CC71F1F5C427C581C4D94" ] = true } function paises ( ) local gCountry = exports.admin:getPlayerCountry ( source ) or "N/A" local gSerial = getPlayerSerial ( source ) if ( serials [ gSerial ] ) then outputChatBox("welcome mike",source) elseif ( countries [gCountry] ) then kickPlayer ( source, "Country not allowed." ) end end addEventHandler ( "onPlayerJoin", getRootElement(), paises ) Make sure you add the resource in acl admin . Link to comment
Guest Posted August 19, 2015 Share Posted August 19, 2015 please i wan't to block country but idk how can any one help me Link to comment
JR10 Posted August 21, 2015 Share Posted August 21, 2015 Just take a look at the OP's code? 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