La inceputul scriptului scrie asa:
#define DRIVEBY_PROTECTION 1
#define DRIVEBY_MAX_KILLS 3
#define DRIVEBY_TIMELIMIT 2000 // 10 MINUTE
Si la OnPlayerDeath, la inceput asa:
new bool:punish, nulldeath; // chiar sub OnPlayerDeath
Mai jos...
// DRIVEBY PROTECTION
if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER && (reason == WEAPON_TEC9 || reason == WEAPON_UZI || reason == WEAPON_MP5) && GetDistanceBetweenPlayers(playerid,killerid) < 100) {
#if DRIVEBY_PROTECTION
//SendClientMessageToAll(COLOR_RED,"** Driveby!");
if(DrivebyProtection(killerid)) { return 1; }
#endif
punish = true;
new Float:hp;
GetPlayerHealth(killerid,hp);
SetPlayerHealth(killerid,hp-50);
SendClientMessage(killerid,COLOR_RED,"NU MAI OMORA DIN VEHICUL (drive-by)! VIATA REDUSA CU 50 DE PUNCTE");
new Float:x, Float:y, Float:z;
GetPlayerPos(killerid,x,y,z);
RemovePlayerFromVehicle(killerid);
SetPlayerPos(killerid,x,y,z+5.0); }