Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Nihongo^

#31
Quote from: habi on Jul 23, 2023, 03:09 PMJust to confirm, are the IP of the players same?
Everest is me
but, before 3 players join the server at the same time, and all these players belonged to other locations and then server crashed

i assume that error so i thought i should check it

i joined the server 3 times and then it crashed
#32
Thanks but
I used your function but this time if 3 or 4 players join the server at same time server get crashed



#33
Quote from: vitovc on Jul 23, 2023, 01:33 PMnot works as fall from building but works with bike fall or explosion fall
function onPlayerActionChange(player, old_action, new_action){
  if(42 == new_action){
    ::MessagePlayer("You fall down", player);
  }
}
Thanks its work,
There's a lot of action id's
may i know the list?

newAction == 12
newAction == 13
and what to do for falling from buildings?
etc
#34
any one can help ?
#35
Quote from: habi on Jul 22, 2023, 05:04 PMIn local variable request,
&key=%sYou are careless.

I am sorry I did not check, it's working now but
after few hours, it start giving me this error until I restart the server



function CheckProxy(ipaddr)
{
 Socket1<-NewSocket("recv");
 local request=format("GET /v2/%s?vpn=1&asn=1&key=%s  HTTP/1.1\r\nHost: proxycheck.io\r\nAccept: */*\r\n\r\n", ipaddr,"96ho1j-a57071-8j1317-7vk380");
 getroottable().rawset(ipaddr+"connF",function(){
 Socket1.Send(request);
 });
 Socket1.SetNewConnFunc(ipaddr+"connF"); Line 8
 Socket1.Connect("proxycheck.io", 80);
}

P.S after restarting the server it works fine nad gives me details of every player's IP but gives error after few hours
#36
In 0.3, there's a function named "OnPlayerFall."

when a player fell down ( from the building or someone shot him with Stuby or shotgun etc.)

I just realized that 0.4 no longer supports it; I would like to ask if there is any alternative to this function.

I use it, but nothing seems to appear.


}
function onPlayerFall(player)
{
    MessagePlayer("You fall down");
}

 
#37
Thanks, but sorry to keep letting you disturb

I just signup and it should give me at least 1000 queries but it showing me its 100
i would like to know if i placed my API key to the correct line ? ( as you shows

Quotelocal request=format("GET /v2/%s?vpn=1&asn=1&key=%s  HTTP/1.1\r\nHost: proxycheck.io\r\nAccept: */*\r\n\r\n", ipaddr,"YOUR_API_KEY");

Quotefunction CheckProxy(ipaddr)
{
 Socket1<-NewSocket("recv");
 local request=format("GET /v2/%s?vpn=1&asn=1  HTTP/1.1\r\nHost: proxycheck.io\r\nAccept: */*\r\n\r\n", ipaddr, "96ho1j-a57071-8j1317-7vk380");
 getroottable().rawset(ipaddr+"connF",function(){
 Socket1.Send(request);
 });
 Socket1.SetNewConnFunc(ipaddr+"connF");
 Socket1.Connect("proxycheck.io", 80);
}




#38
Hi habi

i am sorry but there's an other problem occur here, when player is banned and get kicked checkproxy gave an error here

  line no 43   if(!player) throw print("No player with IP exists");



function recv(response)
{
 if(response.find("{")==null)
  return;
 
 local output=JSONParser.parse( response.slice( response.find("{") ) );
 if( typeof(output) == "table" )
 {
  if("status" in output )
  {
   if(output.status=="ok")
   {
    foreach(a,b in output)
    {
     if(typeof(b)=="table")
     {
      //Can be IP
      if( "proxy" in b && "type" in b )
      {
       //This is ip
       local IP=a;
       //Find the player
       local player=null;
       for(local i=0;i < GetMaxPlayers();i++)
       {
        player=FindPlayer(i);
        if( player && player.IP==IP)
        {
         //Got the player
         break;
        }
       }
    line no 43   if(!player) throw print("No player with IP exists");
       
       if( b.proxy == "yes" || b.type=="VPN")
       {
        print(player.Name+ " is using proxy/VPN");
ServerMessage("[VPN-Usage] [#FF0000]Auto-Kicked: [#FFFFFF][ "+player.Name+ " ][#FF0000] Reason: [#FFFFFF] [Proxy/VPN]");
EchoMessage("[VPN] Auto-Kicked: [ "+player.Name+ " ] Reason: [Proxy/VPN]");
EchoMessageAdmin("[VPN] Auto Kicked: [ "+player.Name+ " ] Reason: [Proxy/VPN] [" +player.IP+ "] Country [" +b.country+ "]");
player.Kick();
return 0;
        /*
         Take actions
        */
       }else if( "country" in b )
       {
        //Ordinary player
        print(player.Name+ " is connecting from "+ b.country);
       }
      }
     }
    }
   }else EchoMessageAdmin("[VPN] status is not ok");
  }else EchoMessageAdmin("[VPN] status code not in output");
 }else EchoMessageAdmin("[VPN] bad response from server");
}
#39
Quote from: habi on Jul 21, 2023, 01:24 PMProxycheck.io
Daily Limit - 100 queries
Registered (get API key) - 1000 queries.
Go for a paid one if you like to have one!
I am sorry for asking you too many questions
i understand it, but what is queries ? and how does it relat to script for detecting proxy

again i apologise for this act
#40
Quote from: habi on Jul 21, 2023, 12:08 PMYes, because you may reach the 'limit' of number of queries w/o key.

If it shows you are using proxy, it might be because of the line in onScriptLoad.

In onScriptLoad, i gave you comment the line CPlayer.__getTable.IP

Also remember, to check IP only if it is not 127.0.0.1
Yes, i totally understand the function, i actually removed CPlayer.__getTable.IP and put the function on my VPS and tried with the real VPN, its detected the proxy so its work

about the API ok i will placee it on my function, also i would like to know is there any packages for the API ? i can see some prices/paid options



#41
Quote from: habi on Jul 21, 2023, 11:06 AMlocal request=format("GET /v2/%s?vpn=1&asn=1&key=%s  HTTP/1.1\r\nHost: proxycheck.io\r\nAccept: */*\r\n\r\n", ipaddr,
"YOUR_API_KEY");

Oh actually the function works now, and it did not require any API, it said i am using proxy

Just one more question do i still need that API ? or just ignore it ?
#42
Quote from: Nihongo^ on Jul 21, 2023, 10:41 AMHabi i am sorry but nothing appeared in the console neither there's any bug 

But i see one thing the function recv(response) not closed properly. I am using Notepad++ and it shows me that the last close-bracket started 

with response.find("{") ) );

if i put another close bracket it refer to if(response.find("{")==null)

i hope you understand what i am saying


About API Key, you know where to insert it.
xd, no where ?
#43
Habi i am sorry but nothing appeared in the console neither there's any bug 

But i see one thing the function recv(response) not closed properly. I am using Notepad++ and it shows me that the last close-bracket started 

with response.find("{") ) );

if i put another close bracket it refer to if(response.find("{")==null)

i hope you understand what i am saying
#44
Thank you habi, i'll check it, kinda new things for me i have few question

1)do i need to put any link inside it ?
local request = format("GET /v2/%s?vpn=1&asn=1 HTTP/1.1\r\nHost: proxycheck.io\r\nAccept: */*\r\n\r\n", ipaddr);

2)For JSONParser
is it necessary to add plugins?
json04rel64.so

3)These words "throw" seem to look like you're giving an example should I change it ?
Quoteif (!player) throw ("No player with IP exists");

Quoteelse {
                throw ("status is not ok");
            }
        } else {
            throw ("status code not in output");
        }
    } else {
        throw ("bad response from server");

4)and in last do i need to put my API on it ?

    // Connect to the proxycheck.io API
 Socket1.Connect("proxycheck.io", 80);[/td]
#45
Quote from: habi on Jul 20, 2023, 07:28 PMPutting httprequest04rel64 first not causing problem to me.
i use plugin link https://github.com/Luckshya/httpreq-squirrel/releases/download/0.2.1/httprequest04rel64.so
I used the same plugins for linux and place them at the top of all plugins now its giving me this error


You can see following plugins i am using ( i put httprequest04rel64 at the top )

 httprequest04rel64 xmlconf04rel64 announce04rel64 squirrel04rel64 sqlite04rel64 geoip04rel64 sockets04rel64 mysql04rel64 ini04rel64 discord04rel64



QuoteWhat are the plugins you use? Do you use earlier versions of my plugins such as filterscripts, npchide, plugincommand? (one of them was faulty)

I am sorry habi i have no idea what kind of plugins i am using as i only download it from here years ago these filterscripts, npchide, plugincommand are new for me never heard about it

I think its only plugins issue do you think there's faulty plugins other the httprequest04rel64  ?