adds SFPD protection for cops
This commit is contained in:
parent
0922f8d8a0
commit
6894da91be
@ -11,4 +11,19 @@
|
|||||||
#include "irresistible\cnr\features\cop\arrest.pwn"
|
#include "irresistible\cnr\features\cop\arrest.pwn"
|
||||||
#include "irresistible\cnr\features\cop\bail.pwn"
|
#include "irresistible\cnr\features\cop\bail.pwn"
|
||||||
#include "irresistible\cnr\features\cop\ticket.pwn"
|
#include "irresistible\cnr\features\cop\ticket.pwn"
|
||||||
#include "irresistible\cnr\features\cop\emp.pwn"
|
#include "irresistible\cnr\features\cop\emp.pwn"
|
||||||
|
|
||||||
|
/* ** Hooks ** */
|
||||||
|
hook OnPlayerGiveDamage( playerid, damagedid, Float: amount, weaponid, bodypart )
|
||||||
|
{
|
||||||
|
if ( p_Class[ damagedid ] == CLASS_POLICE )
|
||||||
|
{
|
||||||
|
new Float: x, Float: y, Float: z;
|
||||||
|
|
||||||
|
GetPlayerPos( damagedid, x, y, z );
|
||||||
|
|
||||||
|
if ( x >= -1650.0 && x <= -1571.0 && y >= 647.0 && y <= 711.0 )
|
||||||
|
return ShowPlayerHelpDialog( playerid, 2000, "You cannot damage LEO officers while they are within the Police Department HQ." ), 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user