18.09.2011, 18:28
(
Последний раз редактировалось KoczkaHUN; 19.09.2011 в 15:36.
)
KoczkaHUN's OnPlayerDriveBy 0.1
DescriptionThis include introduces a new callback:
pawn Код:
public OnPlayerDriveBy(playerid, victimid, iskill)
How is this possible?
This is possible with SAMP 0.3d RC2's new callback, called "OnPlayerTakeDamage".
Usage:
Download the include, and save it in pawno/includes folder with name kopdb.inc
In your FilterScript/GameMode, put it in the top:
pawn Код:
#include <kopdb>
pawn Код:
public OnPlayerDriveBy(playerid, victimid, iskill)
{
new msg[128], name1[24], name2[24], iskillstr[24] = "but it was not a kill";
GetPlayerName(playerid, name1, 24); GetPlayerName(victimid, name2, 24);
if (iskill) iskillstr = "and it was a kill";
format(msg, 128, "< !! DRIVE-BY !! > %s DriveBy-ed on %s, %s",
name1, name2, iskillstr);
return SendClientMessageToAll(-1, msg);
}
- When a player kills an other player with DB, first it fires up callback with iskill = 0, after that with iskill = 1
- When a player stops on an other player with a vehicle (DB), callback will be spammed while the victim loses health. Keep this in mind.
Download:
Pastebin - OnPlayerDriveBy 0.1
Can I make a script made from this?
Please don't do that. I have plans for updating this in the future.
If you have an idea, feel free to post it here.