forgot to fill the description of the meth minijob

This commit is contained in:
Lorenc Pekaj 2018-09-11 08:49:23 +10:00
parent bb57db0a1b
commit 3e739ffd48
2 changed files with 13 additions and 13 deletions

View File

@ -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 );
}

View File

@ -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,14 +23655,9 @@ 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 ) )
if ( include_vehicle_interior && IsPlayerSpawned( i ) && ( GetPlayerMethLabVehicle( i ) == vehicleid && iModel == 508 ) || ( ( GetPlayerVirtualWorld( i ) - VW_SHAMAL ) == vehicleid && iModel == 519 ) )
return i;
}
}
return -1;
}