SA-MP Forums Archive
Anti carpark - helikill - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti carpark - helikill (/showthread.php?tid=193882)



Anti carpark - helikill - ZamaXor - 27.11.2010

Hello

Can anyone script anti vehicle or anti carpark script

If player will carkill or helikill all the players will see in chat "Name has been punished [reason'helikill or carkill]


Re: Anti carpark - helikill - ExeC - 27.11.2010

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new vehid = GetPlayerVehicleID(playerid); //Get's the vehicle ID
    new string[128];
   
    if(vehid > 487) //Mavetrick ID
    {
        SetPlayerHealth(killerid, 0); //Set's the killer with the heli to "0"
        GetPlayerName(playerid, string, sizeof(string));
        format(string, sizeof(string), "Player %s has been punished - (REASON): Heli kill");
        SendClientMessageToAll(0xFF2800FF, string); //Send's the message to all the players in the server
    }
    return 1;
}
For the anti-heli kill. Try it.