From 3e739ffd483a88f438cde22502b56fa4438554c3 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Tue, 11 Sep 2018 08:49:23 +1000 Subject: [PATCH] forgot to fill the description of the meth minijob --- .../irresistible/cnr/features/minijobs/meth.pwn | 16 ++++++++++------ gamemodes/sf-cnr.pwn | 10 +++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/minijobs/meth.pwn b/gamemodes/irresistible/cnr/features/minijobs/meth.pwn index 1746708..6adb865 100644 --- a/gamemodes/irresistible/cnr/features/minijobs/meth.pwn +++ b/gamemodes/irresistible/cnr/features/minijobs/meth.pwn @@ -1,8 +1,8 @@ /* * Irresistible Gaming (c) 2018 * Developed by Lorenc Pekaj - * Module: - * Purpose: + * Module: cnr\features\minijobs\meth.pwn + * Purpose: meth minijob */ /* ** Includes ** */ @@ -18,10 +18,6 @@ #define VW_METH 110 -/* ** Macros ** */ -#define IsPlayerInMethlab(%0) ( GetPVarInt( %0, "inMethLab" ) == 1 && GetPlayerInterior( %0 ) == VW_METH ) -#define GetPlayerMethLabVehicle(%0) ( GetPlayerVirtualWorld( %0 ) - VW_METH ) - /* ** Variables ** */ enum E_METH_PROCEEDURE { @@ -391,3 +387,11 @@ stock haltMethamphetamine( playerid, vehicleid, canceled=1 ) HidePlayerHelpDialog( playerid ); } } + +stock IsPlayerInMethlab( playerid ) { + return ( GetPVarInt( playerid, "inMethLab" ) == 1 && GetPlayerInterior( playerid ) == VW_METH ); +} + +stock GetPlayerMethLabVehicle( playerid ) { + return ( GetPlayerVirtualWorld( playerid ) - VW_METH ); +} diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 3b54892..6497384 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -6994,6 +6994,7 @@ public OnProgressCompleted( playerid, progressid, params ) if ( p_Methamphetamine{ playerid } >= 128 ) return SendError( playerid, "You can only export a maximum of 128 pounds of meth." ); + p_Methamphetamine{ playerid } ++; DestroyDynamicObject( GetGVarInt( "meth_yield", vehicleid ) ); @@ -23654,13 +23655,8 @@ stock IsVehicleOccupied( vehicleid, bool: include_vehicle_interior = false ) if ( GetPlayerVehicleID( i ) == vehicleid ) return i; - if ( include_vehicle_interior ) { - new - iWorld = GetPlayerVirtualWorld( i ); - - if ( IsPlayerSpawned( i ) && ( ( iWorld - VW_METH ) == vehicleid && iModel == 508 ) || ( ( iWorld - VW_SHAMAL ) == vehicleid && iModel == 519 ) ) - return i; - } + if ( include_vehicle_interior && IsPlayerSpawned( i ) && ( GetPlayerMethLabVehicle( i ) == vehicleid && iModel == 508 ) || ( ( GetPlayerVirtualWorld( i ) - VW_SHAMAL ) == vehicleid && iModel == 519 ) ) + return i; } return -1; }