#How do I install samp-opws-fix?

1 messages · Page 1 of 1 (latest)

cyan juniper
#

I have download the .inc and i put it on samp-server\include and samp-server\pawno\include I also created a simple .pwn that has this:

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    CreateExplosion(fX, fY, fZ, 12, 10.0);
    printf("OnPlayerWeaponShot");
    new str[128];
    format(str, sizeof(str), "OnPlayerWeaponShot(%d shot %d with %d at %f, %f, %f)",playerid,  hitid, weaponid, fX, fY, fZ);
    SendClientMessage(playerid, -1, str);
}

But when I join the server with lagshoot off, OnPlayerWeaponShot doesn't get called at all
https://github.com/ReshiramZekrom1/samp-opws-fix

If I enable lagshoot, it does get called

GitHub

OnPlayerWeaponShot and GetPlayerLastShotVectors fixed for lagcomp-disabled servers! - ReshiramZekrom1/samp-opws-fix

#

it seems to work now, and i did nothing, well nvm

rigid void
#

Yeah OnPlayerWeaponShot works with that one but sync gets kinda fucked up. A/D players complained that it felt like a mix of lagshot and skinhit

cyan juniper
#

I see, it does indeed seem like that. Also i tried to combine it using samp-weapon-config which is my ultimate goal, having lagcomp off with server side health to avoid godmode and health hack hacks, but it seems i cant even damage anyone if use both combined so yep 😦

https://github.com/oscar-broman/samp-weapon-config/issues/285#issuecomment-2078042397

GitHub

Would it be possible to have server side health with lagcomp off and if not, why is that? I have tested a godmode cheat and weapon-config with lagcomp on and since health is server-side, the cheat ...

rigid void
cyan juniper
#

@prime zephyr perhaps you may answer? ty reshiram

#

two good pokemon

prime zephyr
#

damn how did that end up here

#

Yeah so basically you need to use lagcomp 1 in server.cfg and hardcode s_LagCompMode = 0 in weapon-config.inc for bullet sync to function with lagshoot mechanics

It was objectively better than keysync based combat in a number of ways but A/D players bitched about it because they couldn't abuse low fps and bad positioning was very punishing.

HOWEVER a small but important fix to sniper bullet sync isn't yet in the AttDef upstream repo, you'll have to wait for that if you're interested or are gonna get invested on this

quick ravine
#

I have problems with opw-fix

#

I adapted that in open.mp, there were deprecates functions

#

When I connect in my server and open fire, OnPlayerWeaponShot isn't called.

#

I don't know why

#

I tried that include in a new script base but that doesn't work too

#

the callback isn't called

prime zephyr
#

u need to enable lag compensation in omp

quick ravine
#

Because I've understood that the include works to pass from lagshoot to activate OnPlayerWeaponShot function

prime zephyr
# quick ravine Because I've understood that the include works to pass from lagshoot to activate...

For the server to invoke opws related callbacks in pawn, the server must be configured as lagcomp 1

The server then sends the InitGame packet once, at player connect, and is never sent again under normal circumstances.

Our includes, exploit a client bug that happens when you send the InitGame multiple times:

  • The first time in lagcomp 1 mode, enabling bulletsync network and processing (skinhit) in the client
  • A second time, to set the client back to lagcomp 0, disabling skinhit, but keeping the bulletsync network related things working.

Then the server needs to be in lagcomp 1 or it will drop the incomming bulletsync packets.

All the includes do this for you, you just need to enable lagcomp in your server config, and modify weapon-config to account for this, only if you happen to use it.

quick ravine
#

In other words and I'm sorry If I can't understand some things possibly.

If I set my server with lagcomp 1, an user connects, the server sends a packet once, and... If the lagcomp is 1 I would have some functions enabled and the server set lagcomp for that player in 0 after?

#

I say that because you talk about "A second time", do that mean when a player connect for a second time?

#

or your talk about of a process, for example: You connect with server lagcomp 1, enabling functions and then the server set lagcomp 0 to apply in that user?

quick ravine
#

I want to hit lag but not skin.

#

And I don't want that with lagcomp 1 my server suffers that modifications hitting skins only

quick ravine
quick ravine
prime zephyr
#

Remove things as you see fit

quick ravine
#

And I'm so sorry If I'm disturbing you

prime zephyr
prime zephyr
#

It is not as straightforward and I still have to upload some things to upstream despondency

#

But that include alone as it is now is enough to test

quick ravine
#

Thanks a lot, man.

#

I'll be testing that.

#

Greetings and a hug.

quick ravine
prime zephyr
#

use whichever

prime zephyr
#

Pwac first vestiges stop looking at that haha

final creek
#

whaaat a chad

#

hahahahah

#

btw what does that shit do?

prime zephyr
#

I think it was related to a specific camera mode being used by some silent aimbots

#

I made it hard to understand on purpose, as a result i don't remember how this works anymore