^Dev-PoinT^ Posted November 22, 2011 Posted November 22, 2011 Hi all see My Code addEventHandler('onPlayerQuit', root, function(reason) outputChatBox('* ' .. getPlayerName(source) .. ' Has left the game [' .. reason .. ']',getRootElement(), 255, 0, 0) end ) function a () local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) local ip = getPlayerIP( source ) setElementData(source,"Country",flag) outputChatBox(getPlayerName(source).."Has Join The Game From ["..flag..]..["..ip..]",root, 255,255,255) end addEventHandler("onPlayerJoin",getRootElement(),a) he say Dev-PoinT Has Join The Game From [sA127.0.0.1] how Make it Dev-PoinT Has Join The Game From [sA] [ip Here] i tryed but alwasy return false
CapY Posted November 22, 2011 Posted November 22, 2011 addEventHandler('onPlayerQuit', root, function(reason) outputChatBox('* ' .. getPlayerName(source) .. ' Has left the game [' .. reason .. ']',getRootElement(), 255, 0, 0) end ) function a () local flag = call(getResourceFromName("admin"), "getPlayerCountry", source) local ip = getPlayerIP( source ) setElementData(source,"Country",flag) outputChatBox(getPlayerName(source).."Has Join The Game From"..flag..", IP: "..ip..,root, 255,255,255) end addEventHandler("onPlayerJoin",getRootElement(),a) Not tested. EDIT:You didn't finished a string somewhere but i can't see where.(Give us some debug) EDIT2:Now it should work.(probably)
12p Posted November 22, 2011 Posted November 22, 2011 This code is a bit wrong and can be made with less lines/characters. addEventHandler('onPlayerQuit', root, function(reason) outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [' .. reason .. ']',root, 255, 0, 0) end ) function a () local flag = exports.admin:getPlayerCountry ( source ) setElementData(source,"Country",flag) outputChatBox("* "..getPlayerName(source).." has joined the game from"..flag..", IP: "..tostring(getPlayerIP( source )),root, 255, 0, 0) end addEventHandler("onPlayerJoin",getRootElement(),a)
bandi94 Posted November 22, 2011 Posted November 22, 2011 i have a question can i find somewhere the range file edited whit the full name of the country i mean like "1,65535,France" if not i will edit it but i don't have to much time and it's better if i find it done thx Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
^Dev-PoinT^ Posted November 22, 2011 Author Posted November 22, 2011 not work my code work but outputChatBox need to be Like this [sA] [ip] not Sa .. ip
Castillo Posted November 22, 2011 Posted November 22, 2011 addEventHandler('onPlayerQuit', root, function(reason) outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [' .. reason .. ']',getRootElement(), 255, 0, 0) end ) function a () local flag = exports.admin:getPlayerCountry ( source ) setElementData(source,"Country",flag) outputChatBox("* "..getPlayerName(source).." has joined the game from [".. tostring(flag) .."] [".. tostring(getPlayerIP( source )) .."]",getRootElement(), 255, 0, 0) end addEventHandler("onPlayerJoin",root,a) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted November 22, 2011 Posted November 22, 2011 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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