AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Real Ping (https://forums.alliedmods.net/showthread.php?t=263745)

K1d0x 06-01-2015 01:26

Real Ping
 
Hello alliedmods,

I want to modify PingFaker made by MeRcyLeSS, there is any possibility to write ping in ping command and status?
PingFaker makes job only in scoreboard
Thanks,

Neeeeeeeeeel.- 06-03-2015 08:23

Re: Real Ping
 
As a client (player), you can check the ping thought your OS console (only if the server has a ICMP server, which usually they have).

From the server, would be easier check plugins.ini
But you can ping the clients throught sockets with a plugin.

K1d0x 06-03-2015 08:31

Re: Real Ping
 
An example please?

Neeeeeeeeeel.- 06-03-2015 14:04

Re: Real Ping
 
Quote:

Originally Posted by K1d0x (Post 2304297)
An example please?

First, tell us about the purpose of the plugin. Are you the server owner? Why wouldn't be easy to check if there is a pingfaker plugin in your server? Without a context, it's stupid to make a plugin to check if your own server has pingfaker plugin running.

K1d0x 06-03-2015 14:09

Re: Real Ping
 
Yes, is my server and i have PingFaker 1.5 installed, in scoreboard is running ok, but if i use ping or status command, there is real ping.

So it doesn't help to much that plugin, if you know about "ping" and "status" command then you just simple can see players real ping. I want to replace ping only if it is above 100+

Neeeeeeeeeel.- 06-03-2015 15:42

Re: Real Ping
 
Because of your english, I couldn't uderstand you at all. But I got what you want.

You have to re-make the status command using Orpheu, Okapi or Rage. I recommend Okapi.

Here you have an example for hooking "status" command with Okapi (Windows only).
PHP Code:

#include <amxmodx>
#include <okapi>

#define SKIPBIT 0xDEF

public plugin_init()
{
    new 
iEngineBasePtr okapi_engine_get_base_ptr()
    new 
iBytes_Host_Status_f[] =  {0x55,0x8B,0xEC,0x81,0xEC,SKIPBIT,SKIPBIT,SKIPBIT,SKIPBIT,0xA1,SKIPBIT,SKIPBIT,SKIPBIT,SKIPBIT,0x53,0x56,0x57,0xBF,SKIPBIT,SKIPBIT,SKIPBIT,SKIPBIT,0x33,0xDB,0x8B,0xF7,0x3B,0xC7,0x89,0x5D,0xE4,0x89,0x5D,0xDC,0x89,0x5D,0xE8,0x89,0x5D,0xF8,0x89,0x75,0xFC,0xC7,0x45,0xF4,0x50,0xCF};
    new 
iSig_Host_Status_f okapi_engine_find_sig_at(iEngineBasePtriBytes_Host_Status_fsizeof iBytes_Host_Status_f);
    new 
okapi_func:hFunc_Host_Status_f okapi_build_function(iSig_Host_Status_farg_void);
    
okapi_add_hook(hFunc_Host_Status_f"Host_Status_f");
}

public 
Host_Status_f()
{
    new 
id engfunc(EngFunc_GetCurrentPlayer)+1;
    
client_print(0print_chat"test: %d"id);
    return 
okapi_ret_supercede;



K1d0x 06-03-2015 22:20

Re: Real Ping
 
Well i need module for linux, i will try orpheu. ..

You can show me an example ? Using Orpheu? Ty

JusTGo 06-04-2015 05:13

Re: Real Ping
 
Neeeeeeeeeel.-
i don't think you should help him on this one it just sucks that a player can't know his real ping its just like lieing to the player saying that he have 300 fps while he only have 20 also players could still know thier real ping with net_graph 1 which most of players use it so what you trying to do is just useless.

aron9forever 06-04-2015 09:27

Re: Real Ping
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 2304421)
Because of your english, I couldn't uderstand you at all. But I got what you want.

You have to re-make the status command using Orpheu, Okapi or Rage. I recommend you using Okapi.

Here you have an example for hooking "status" command with Okapi (Windows only).

delete that shit and don't post orpheu code

did you even stop and think before writing code that blocks status?

Depresie 06-04-2015 10:08

Re: Real Ping
 
i think you shouldn't told him that, he could have a "hosting company" and try to use that method to decieve potential customers


All times are GMT -4. The time now is 01:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.