John Smith Posted July 13, 2014 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
Max+ Posted July 13, 2014 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 .
Guest Posted August 19, 2015 Posted August 19, 2015 please i wan't to block country but idk how can any one help me
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