Master_MTA Posted September 28, 2018 Posted September 28, 2018 hello their i just wanna know is there any way to check if the player connected to internet or no it's doesn't matter if he was in local server or else i just wanna to check if he have internet connection or not i know i can do it with fetchRemote but it's take time to configuration so i need any way else faster Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
N3xT Posted September 28, 2018 Posted September 28, 2018 You're trying to check if the player has an internet connection in the local server, right?
Master_MTA Posted September 28, 2018 Author Posted September 28, 2018 40 minutes ago, N3xT said: You're trying to check if the player has an internet connection in the local server, right? yup i guess i can do it with getPlayerIP but this way will not work correctly because the player maybe change his default ip adress 127.0.0.1 Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
N3xT Posted September 28, 2018 Posted September 28, 2018 I have another way but I'm not sure if it's going to work perfectly or not Try to get the player country from his IP, if you find his country then he's connected, anything else means he's disconnected.
Master_MTA Posted September 28, 2018 Author Posted September 28, 2018 2 minutes ago, N3xT said: anything else means he's disconnected thx i will check it 5 minutes ago, N3xT said: I have another way but I'm not sure if it's going to work perfectly or not that is not work because getplayerip function doesn't get the global ip of user in local server it's get his local ip any other idea+_+ Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
Simple. Posted September 28, 2018 Posted September 28, 2018 (edited) 9 hours ago, Master_MTA said: hello their i just wanna know is there any way to check if the player connected to internet or no it's doesn't matter if he was in local server or else i just wanna to check if he have internet connection or not i know i can do it with fetchRemote but it's take time to configuration so i need any way else faster I'm not sure exactly what you want, but maybe that's what you want onPlayerNetworkStatus Edited September 28, 2018 by Simple. h3x#2020
Master_MTA Posted September 28, 2018 Author Posted September 28, 2018 35 minutes ago, Simple. said: onPlayerNetworkStatus nope i need to check if the player connected to internet or no Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
NeXuS™ Posted September 28, 2018 Posted September 28, 2018 I don't get what you are trying to achieve. On a local server, you'll be the only player connected to the server. If you open the ports for it, the player has to have an internet connection to join your server. Did I help you? NeXuS™#0001
Master_MTA Posted September 28, 2018 Author Posted September 28, 2018 23 minutes ago, NeXuS™ said: to join your server. that's not what am talking about i need something that make me know if user have connected to internet or no is there any way i will create resource depends on this if the user have internet connection then load resource else don't load it that's what am talking about Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
NeXuS™ Posted September 28, 2018 Posted September 28, 2018 A player cannot join your server if he has no internet connection, unless you are hosting a local server and that player is connected to your internet. Did I help you? NeXuS™#0001
Moderators IIYAMA Posted September 28, 2018 Moderators Posted September 28, 2018 In case of a local-server. JavaScript + browser might do the trick as well: https://wiki.multitheftauto.com/wiki/ExecuteBrowserJavascript https://stackoverflow.com/questions/189430/detect-the-internet-connection-is-offline if (navigator.onLine == true) { console.log("This might work"); } (no guarantees for this browser) https://wiki.multitheftauto.com/wiki/Resource_Web_Access !important 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Master_MTA Posted September 28, 2018 Author Posted September 28, 2018 (edited) 1 hour ago, NeXuS™ said: internet look u didn't understand me so i will explain what am gonna do first of all am gonna create dxlib editor for my own lib good so this is resource must be work on 1 pc only just enter the serial which u get it when u bought the dxlib editor from me good so the idea i have a database on my vps i will make the resource when it start for the first time to ask the user to enter the serial but before that i need to check if the user have internet connection or not because if callRemote return false that's mean my website is shutdown in this case i will make dxlib editor free for all users so i need first to check if the user is connected to internet or not to avoid returning callRemote false while my website is lunched u got it? 22 minutes ago, IIYAMA said: (no guarantees for this browser) that's will be enough thx i don't know how this idea didn't come to my mind thx dude Edited September 28, 2018 by Master_MTA 1 Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
NeXuS™ Posted September 28, 2018 Posted September 28, 2018 Or you can just use fetchRemote and use the responseInfo/success part to check if his serial is in the database. I'd reconsider this resource, as this means you have to have an internet connection to be able to use the script. Are you planning to give them a compiled script, or a source code? 1 Did I help you? NeXuS™#0001
iMr.WiFi..! Posted September 28, 2018 Posted September 28, 2018 12 hours ago, Master_MTA said: i know i can do it with fetchRemote but it's take time to configuration so i need any way else faster Just now, NeXuS™ said: Or you can just use fetchRemote and use the responseInfo/success part to check if his serial is in the database. I'd reconsider this resource, as this means you have to have an internet connection to be able to use the script. Are you planning to give them a compiled script, or a source code? Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
Master_MTA Posted September 28, 2018 Author Posted September 28, 2018 1 minute ago, NeXuS™ said: ompiled script compiled script 2 minutes ago, NeXuS™ said: etchRemote and use the responseInfo/succes yeah that was my idea but it's take a while to fetchRemote & it's not stable some times it's returns false while u have internet connection any way thx for ur replay i didn't seen it thx @iMr.WiFi..! thx all 12 hours ago, Master_MTA said: i know i can do it with fetchRemote but it's take time to configuration Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
NeXuS™ Posted September 28, 2018 Posted September 28, 2018 Easy way. As you have a compiled script, this means you can add a line into it. local givenSerial = -- The player's serial who bought the script. function resourceLoad() if givenSerial == getPlayerSerial(localPlayer) then -- Loading functions end end addEventHandler("onClientResourceStart", resourceRoot, resourceLoad) This means you'll have to get their serial, when they make the purchase, and then compile the resource this way. Did I help you? NeXuS™#0001
Master_MTA Posted September 28, 2018 Author Posted September 28, 2018 1 minute ago, NeXuS™ said: serial am not talking about user serial am talking about serial that i made it from chars and numbers and give it to user to enter it to edit box and every thing after that is easy callRemote,check with php etc.. i will sell this resource for more 1 user so it's hard to me to edit script for every user and compile it i will make every think automatically buying the script from website and creating serial for user when he pay after paypal success etc thx dude .. Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
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