31.07.2011, 18:31
I was bored and felt like making this.
Edit: I just noticed I only made driveby support for passengers and totally forgot about driver driveby
Your server needs to be 0.3c R3 or later!
Info
This is a simple include that allows you to find out whether a passenger (NOT the driver) is or isn't drivebying. It comes with two callbacks and one function:
Here is some example code:
The above code kills (read: should kill) any passenger that kills another player using driveby.
Download
To install and use this include, you just gotta download it and include it at the top of your script using:
Good luck. Not that you need any.
Download
Solidfiles
Pastebin
Credits
Credits go to:
Once again, I'll try adding support for driver driveby soon
Edit: I just noticed I only made driveby support for passengers and totally forgot about driver driveby
Your server needs to be 0.3c R3 or later!
Info
This is a simple include that allows you to find out whether a passenger (NOT the driver) is or isn't drivebying. It comes with two callbacks and one function:
pawn Код:
public OnPlayerStartDriveby(playerid) // Gets called when a player starts drivebying
public OnPlayerStopDriveby(playerid) // Gets called when a player stops drivebying
pawn Код:
native IsPlayerDrivebying(playerid); // Can be used at all times to check if a player is or isn't drivebying.
// Returns 1 if the player IS drivebying, else it returns 0 (obviously)
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) //Somebody gets killed
{
if(IsPlayerDrivebying(killerid)) //Checks if the killer is drivebying, and if so..
{
SetPlayerHealth(killerid, 0); //..if so, the killer gets killed because driveby is forbidden!
SendClientMessage(killerid, 0xFF000000, "Thou shall not driveby!");
}
return 1;
}
Download
To install and use this include, you just gotta download it and include it at the top of your script using:
pawn Код:
#include <driveby>
Download
Solidfiles
Pastebin
Credits
Credits go to:
- Zh3r0 - For some unknown reason
- linuxthefish - Testing
- SA-MP dev team - GetPlayerCameraMode function
Once again, I'll try adding support for driver driveby soon