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);
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.Vehicle related bug:
Video: https://www.youtube.com/watch?v=1nfzxu6irp0
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.Anti Car/Planebomb:
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
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.Anti Ninjajack:
Video: https://www.youtube.com/watch?v=xI6o4EJBJH4
When a player dies by being ninja jacked, it'll also call the callback: RevivePlayer(playerid, bomber, reason).Anti Quickswap:
I don't got a video for this but it works, you can be sure about it!
Once a player quickswaps the callback OnPlayerQuickSwap will be called.How to use the callbacks inside of your script:
NOTE: This detection will only be called if a player hit a vehicle/player before swapping his weapons to avoid mass-spamming.
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; }
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. |
fatal error 100: cannot read from file: "emmetinclude" |