[FilterScript] Cleo Crash 0.3.7 Protect
#1

hackers were caused to crash when passing my players side, then this solution seems to solve the problem.

Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    //WEAPONS WITH NO BULLET EXCEED BLOCK
    if(weaponid < 22 || weaponid > 38) { return 0; }
    //Z LIMIT BULLETS EXCEED
    if(!(-20000.0 <= z <= 20000.0)) { return 0; }
    return 1;
}
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=581259

Quote:

- Weapon ID checking after OnPlayerWeaponShot in case the script doesn't filter it.

It's already fixed in the new update.
Reply
#3

I had not seen this topic, thanks for the tip, just upgraded my server.

anyway I will keep the topic, who is the original version 0.3.7, this solution will help.
Reply
#4

EDIT:

Ahh ok i got it thanks SickAttack.
Reply
#5

Quote:
Originally Posted by RaeF
Посмотреть сообщение
Why yo do you get the player position? it won't affect anything
Код:
GetPlayerPos(playerid, x, y, z);
if(!(-20000.0 <= z <= 20000.0)) { return 0; }
And also this fix is already writen here:
https://sampforum.blast.hk/showthread.php?tid=535559
It de-syncs bullets if they are out of the boundaries, it was provided by dugi.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)