From 7d83b8bccbb6e6e47effc851bc184165a707e534 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Fri, 5 Oct 2018 16:32:01 +1000 Subject: [PATCH] add chainsaw pickup ... remove dialog for lumberjack --- gamemodes/irresistible/cnr/dialog_ids.pwn | 2 +- .../cnr/features/minijobs/lumberjack.pwn | 40 +++---------------- 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/gamemodes/irresistible/cnr/dialog_ids.pwn b/gamemodes/irresistible/cnr/dialog_ids.pwn index 68bbbe4..10957de 100644 --- a/gamemodes/irresistible/cnr/dialog_ids.pwn +++ b/gamemodes/irresistible/cnr/dialog_ids.pwn @@ -47,7 +47,7 @@ #define DIALOG_GARAGE_INTERIORS 1035 #define DIALOG_GARAGE_INT_CONFIRM 1036 #define DIALOG_GANG_LIST 1037 -#define DIALOG_LUMBERJACK 1038 +//#define DIALOG_LUMBERJACK 1038 #define DIALOG_FIGHTSTYLE 1039 #define DIALOG_TOYS_MAIN 1040 #define DIALOG_TOYS 1041 diff --git a/gamemodes/irresistible/cnr/features/minijobs/lumberjack.pwn b/gamemodes/irresistible/cnr/features/minijobs/lumberjack.pwn index c02f611..0184523 100644 --- a/gamemodes/irresistible/cnr/features/minijobs/lumberjack.pwn +++ b/gamemodes/irresistible/cnr/features/minijobs/lumberjack.pwn @@ -34,13 +34,16 @@ static stock g_treeData [ MAX_TREES ] [ E_TREE_DATA ], Iterator: trees < MAX_TREES >, g_LogCountObject = INVALID_OBJECT_ID, - g_LogsInStock = 0, - g_LumberjackCP = -1 + g_LogsInStock = 0 ; /* ** Hooks ** */ hook OnScriptInit( ) { + // pickups + CreateDynamicPickup( 341, 2, -2327.8730, -100.6307, 35.2878 ); // Chainsaw @Garcia + // CreateDynamicPickup( 341, 2, -2069.1431, 1788.9657, 43.7386 ); // Chainsaw @Alcatraz + // create the sign for wood count SetDynamicObjectMaterialText( CreateDynamicObject( 19353, -2337.8610, -107.4217, 36.2978, 0.0000, 0.0000, 90.0551 ), 0, "Wood Chipper", 130, "impact", 80, 0, -1, 0, 1 ); SetDynamicObjectMaterialText( CreateDynamicObject( 19353, -2336.3244, -113.2057, 40.6778, 0.0000, 0.0000, 179.9560 ), 0, "Lumberjack", 130, "impact", 100, 0, -1, 0, 1 ); @@ -48,10 +51,6 @@ hook OnScriptInit( ) SetDynamicObjectMaterial( CreateDynamicObject( 12814, -2337.1, -94.00, 34.28, 0.0, 0.0, 270.0, .streamdistance = 500.0, .priority = 100 ), 0, 19381, "all_walls", "desgreengrass" ); SetDynamicObjectMaterial( CreateDynamicObject( 12814, -2337.6, -105.3, 34.28, 0.0, 0.0, 90.00, .streamdistance = 500.0, .priority = 100 ), 0, 19381, "all_walls", "desgreengrass" ); - // checkpoint for chainsaw - g_LumberjackCP = CreateDynamicCP( -2323.5676, -97.2582, 35.3078, 1.0, -1, -1, -1, 100.0 ); - CreateDynamic3DTextLabel( "[LUMBERJACK JOB]", COLOR_GOLD, -2323.5676, -97.2582, 35.3078, 20.0 ); - // create the trees near san fierro Lumberjack_CreateTree( -2358.10000000, -84.60000000, 34.10000000 ); Lumberjack_CreateTree( -2349.90000000, -85.40000000, 34.10000000 ); @@ -136,35 +135,6 @@ hook OnPlayerDeath( playerid, killerid, reason ) return 1; } -hook OnPlayerEnterDynamicCP( playerid, checkpointid ) -{ - if ( checkpointid == g_Checkpoints[ CP_LUMBERJACK ] ) - { - if ( p_Class[ playerid ] != CLASS_CIVILIAN ) - return SendError( playerid, "Only civilians can access this feature." ); - - szLargeString[ 0 ] = '\0'; - strcat( szLargeString, ""COL_WHITE"Welcome to the "COL_ORANGE"Lumberjack"COL_WHITE" job! \n\nHere we cut trees, chop them further then process them into crates.\nWe pay well for cutting a tree down and processing the logs. You can also\nbe a driver that will transport the boxes to the" ); - strcat( szLargeString, "factory that requires it.\n\nOnly a specific vehicle can be driven to have these boxes delivered.\nIf it's not there and somewhere lost, contact an administrator to bring it back!" ); - ShowPlayerDialog( playerid, DIALOG_LUMBERJACK, DIALOG_STYLE_MSGBOX, "{FFFFFF}Lumberjack Job", szLargeString, "Join", "Cancel" ); - return 1; - } - return 1; -} - -hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) -{ - if ( dialogid == DIALOG_LUMBERJACK && response ) - { - if ( IsPlayerJailed( playerid ) ) - return SendError( playerid, "This feature is disabled if you are jailed." ); - - SendServerMessage( playerid, "Thank you for your participation, you have been given a chainsaw!" ); - GivePlayerWeapon( playerid, 9, 1 ); - } - return 1; -} - hook OnPlayerStateChange( playerid, newstate, oldstate ) { if ( newstate != PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_DRIVER ) { // Driver has a new state?