From 4eb8095f343a3005a65fafeef3fee02b894ee0e3 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Wed, 17 Oct 2018 00:57:16 +1100 Subject: [PATCH] notify player if his weed gets stolen --- gamemodes/irresistible/cnr/features/weed.pwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gamemodes/irresistible/cnr/features/weed.pwn b/gamemodes/irresistible/cnr/features/weed.pwn index c2ce011..13bcee1 100644 --- a/gamemodes/irresistible/cnr/features/weed.pwn +++ b/gamemodes/irresistible/cnr/features/weed.pwn @@ -76,7 +76,12 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) { if ( ! g_weedData[ weedid ] [ E_GROW_TIME ] ) { - if ( player_class != CLASS_POLICE ) { + if ( player_class != CLASS_POLICE ) + { + if ( g_weedData[ weedid ] [ E_USER_ID ] != playerid ) + { + SendServerMessage( g_weedData[ weedid ] [ E_USER_ID ], "%s(%d) has stolen a gram of weed from your plant!", ReturnPlayerName( playerid ), playerid ); + } GivePlayerWantedLevel( playerid, 6 ); // give wanted level to police }