SA-MP Forums Archive
[FilterScript] Anti Roleplay Rule Breaks. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti Roleplay Rule Breaks. (/showthread.php?tid=524445)



Anti Roleplay Rule Breaks. - jihadmeneer - 06.07.2014

Hello, this is my second release, I made a small FS for some annoying exploits/abuses which are being abused in a roleplay server.

So, what does this FS detect?
New callbacks:

Code:
RevivePlayer(playerid, bomber(killer), reason)

Reason 1 - Died by ninjajack.
Reason 2 - Died by carbomb/planebomb.
Reason 3 - Died by being ran over by a vehicle.

OnPlayerQuickSwap(playerid, weaponid);
I'll go past each point and I'll explain how I detect them, and I got a video of them.

Anti G-Bug:
This is easily detected, whenever the callback OnPlayerEnterVehicle gets called, it'll run a two second timer, if the distance between the player and the vehicle is too long, it'll clear the player's animation to prevent him from TP'ing inside the vehicle.

Video: https://www.youtube.com/watch?v=1nfzxu6irp0
Vehicle related bug:
I'll first explain the bug, imagine you are driving in a car with one other passenger, if he would tab out, and if you(as the driver) leaves the vehicle, it'll stay at the correct location until the passenger tabs back in, then the vehicle would TP back to the position where he tabbed out.

Those two video's will show it:

Without the fix:
https://www.youtube.com/watch?v=jIVyeGoDlik

With the fix:
https://www.youtube.com/watch?v=j60URVyDqNA
Anti Car/Planebomb:
I think I don't have to explain the meaning of the car/planebomb, it'll call this new callback when players died due a bomber: RevivePlayer(playerid, bomber, type), if you got a death system inside of your GM you can revive them, ect.

Video: https://www.youtube.com/watch?v=xI6o4EJBJH4
Anti Ninjajack:
When a player dies by being ninja jacked, it'll also call the callback: RevivePlayer(playerid, bomber, reason).

I don't got a video for this but it works, you can be sure about it!
Anti Quickswap:
Once a player quickswaps the callback OnPlayerQuickSwap will be called.

NOTE: This detection will only be called if a player hit a vehicle/player before swapping his weapons to avoid mass-spamming.
How to use the callbacks inside of your script:

Code:
forward RevivePlayer(playerid, bomber, reason);
public RevivePlayer(playerid, bomber, reason)
{
     new string[128];
     switch (reason)
     {
     case 1: format(string, sizeof(string), "WARNING: %s has been ninja-jacked by %s.", PlayerRPName(playerid), PlayerRPName(bomber));
    case 2: format(string, sizeof(string), "WARNING: %s has been bombed by %s.", PlayerRPName(playerid), PlayerRPName(bomber));
    case 3: format(string, sizeof(string), "WARNING: %s has been car rammed/helibladed to death by %s.", PlayerRPName(playerid), PlayerRPName(bomber));
    }
    if (!CharacterData[playerid][pAdmin]) SendAdminMessage(YELLOW, string);
    return 1;
}
DL: Click here


Re: Anti Roleplay Rule Breaks. - YoungKris - 06.07.2014

very very good man i will use


Re: Anti Roleplay Rule Breaks. - jihadmeneer - 06.07.2014

Quote:
Originally Posted by YoungKris
View Post
very very good man i will use
Thanks!


Re: Anti Roleplay Rule Breaks. - trandiep1982 - 07.07.2014

C:\Users\pc\Downloads\exploitfixes.pwn(5) : fatal error 100: cannot read from file: "emmetinclude"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: Anti Roleplay Rule Breaks. - KayJ - 07.07.2014

Quote:
Originally Posted by trandiep1982
View Post
C:\Users\pc\Downloads\exploitfixes.pwn(5) : fatal error 100: cannot read from file: "emmetinclude"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Is there anything in the script?


Re: Anti Roleplay Rule Breaks. - jihadmeneer - 07.07.2014

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


Re: Anti Roleplay Rule Breaks. - IDarkness - 07.07.2014

It cool but from where can i get that emmetinclude
because its giving me
Quote:

fatal error 100: cannot read from file: "emmetinclude"




Re : Anti Roleplay Rule Breaks. - simo0000 - 11.07.2014

very very good man!