From c9ebbe74e8a617d8a48e49adf8bcc8e4eeb228ff Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sat, 1 Jun 2019 18:20:48 +1000 Subject: [PATCH] restore oldschool class selection --- gamemodes/irresistible/cnr/classes.pwn | 34 ++++------------ .../cnr/static/server_objects.pwn | 39 ------------------- 2 files changed, 7 insertions(+), 66 deletions(-) diff --git a/gamemodes/irresistible/cnr/classes.pwn b/gamemodes/irresistible/cnr/classes.pwn index 1ae1da6..0bd0b27 100644 --- a/gamemodes/irresistible/cnr/classes.pwn +++ b/gamemodes/irresistible/cnr/classes.pwn @@ -252,38 +252,19 @@ hook OnPlayerSpawn( playerid ) hook OnPlayerRequestClass( playerid, classid ) { - // SetPlayerPos( playerid, -1971.1536, 129.4870, 27.6875 ); - // SetPlayerFacingAngle( playerid, 90.0 ); - SetPlayerPos( playerid, 229.613998, 87.164001, 1605.039978 ); - SetPlayerFacingAngle( playerid, -90.000000 ); + SetPlayerPos( playerid, -1971.1536, 129.4870, 27.6875 ); SetPlayerInterior( playerid, 0 ); - SetPlayerVirtualWorld( playerid, 0 ); - //SetPlayerCameraPos( playerid, -1974.1431, 133.3700, 29.7107 ); - //SetPlayerCameraLookAt( playerid, -1970.6431, 129.3700, 28.2107 ); + SetPlayerFacingAngle( playerid, 90.0 ); if ( p_ClassSelection{ playerid } == false ) - { - static const Float: START_POS[ 3 ] = { 243.5, 87.23, 1605.9 }; - static const Float: FINAL_POS[ 3 ] = { 231.9, 87.23, 1605.9 }; - - InterpolateCameraPos( playerid, START_POS[ 0 ], START_POS[ 1 ], START_POS[ 2 ], FINAL_POS[ 0 ], FINAL_POS[ 1 ], FINAL_POS[ 2 ], 17500, CAMERA_MOVE ); - InterpolateCameraLookAt( playerid, FINAL_POS[ 0 ], FINAL_POS[ 1 ], FINAL_POS[ 2 ], FINAL_POS[ 0 ] - 0.4, FINAL_POS[ 1 ], FINAL_POS[ 2 ] - 0.05, 15000, CAMERA_MOVE ); - - // InterpolateCameraPos( playerid, -1976.4252, 119.9899, 30.0, -1974.0302, 133.0427, 27.6940, 10000, CAMERA_MOVE ); - // InterpolateCameraLookAt( playerid, -1974.0302,133.0427,27.6940, -1971.1536,129.4870,27.6875, 10000, CAMERA_MOVE ); - + { + InterpolateCameraPos( playerid, -1976.4252, 119.9899, 30.0, -1974.0302, 133.0427, 27.6940, 10000, CAMERA_MOVE ); + InterpolateCameraLookAt( playerid, -1974.0302,133.0427,27.6940, -1971.1536,129.4870,27.6875, 10000, CAMERA_MOVE ); p_ClassSelection{ playerid } = true; } - RemovePlayerAttachedObject( playerid, 1 ); - SetPlayerAttachedObject( playerid, 1, 19560, 6, 0.084999, 0.060998, -0.164999, 3.8, 81.6001, -19.3, .materialcolor1 = 0xFF000000 ); - Streamer_Update( playerid, STREAMER_TYPE_OBJECT ); - - // ApplyAnimation( playerid, "MISC", "SEAT_TALK_02", 2.0, 1, 0, 0, 0, 0 ); - if ( GetPlayerSpecialAction( playerid ) != SPECIAL_ACTION_CARRY ) { - TogglePlayerControllable( playerid, 0 ); - SetPlayerSpecialAction( playerid, SPECIAL_ACTION_CARRY ); - } + //ApplyAnimation( playerid, "FOOD", "FF_Sit_Look", 4.0, 1, 0, 0, 0, 0 ); + ApplyAnimation( playerid, "MISC", "SEAT_TALK_02", 2.0, 1, 0, 0, 0, 0 ); if ( CLASS_CIVILIAN_RANGE[ 0 ] <= classid <= CLASS_CIVILIAN_RANGE[ 1 ] ) { @@ -420,7 +401,6 @@ stock IsPlayerClassApproved( playerid ) { TextDrawHideForPlayer( playerid, g_classTextdrawName[ i ] ); } TextDrawHideForPlayer( playerid, g_classBoxTD ); - RemovePlayerAttachedObject( playerid, 1 ); return 1; } diff --git a/gamemodes/irresistible/cnr/static/server_objects.pwn b/gamemodes/irresistible/cnr/static/server_objects.pwn index 2740e40..9313de4 100644 --- a/gamemodes/irresistible/cnr/static/server_objects.pwn +++ b/gamemodes/irresistible/cnr/static/server_objects.pwn @@ -11,45 +11,6 @@ /* ** Functions ** */ hook OnScriptInit( ) { - // Classes - CreateDynamicObject( 14846, 242.121002, 77.313003, 1605.078002, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 2605, 237.936004, 85.197998, 1604.431030, 0.000000, 0.000000, 80.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 2356, 238.682006, 84.823997, 1604.057983, 0.000000, 0.000000, 61.299999, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 19623, 236.035995, 86.892997, 1605.670043, 0.000000, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 19611, 236.072998, 86.892997, 1604.037963, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 85.385002, 1606.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.037002, 87.126998, 1605.214965, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.035003, 87.125000, 1605.713012, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.453979, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.104003, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.754028, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.404052, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.053955, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.223999, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.333984, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.884033, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.994018, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.524047, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.634033, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 88.864997, 1606.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 ); - SetDynamicObjectMaterial( CreateDynamicObject( 2834, 230.143997, 86.521003, 1604.057983, 0.000000, 0.000000, 8.199999, .priority = 9999, .streamdistance = -1.0 ), 0, 6287, "pierc_law2", "bluemetal", -16 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.284057, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.163940, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19377, 228.938995, 87.805999, 1605.038940, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 19377, "none", "none", 1 ); - CreateDynamicObject( 927, 229.072006, 89.900001, 1605.298950, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 927, 229.072006, 84.360000, 1605.698974, 0.000000, 180.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 927, 229.072006, 82.709999, 1606.699951, 0.000000, -90.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1606.413940, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "7'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1606.063964, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "6'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.713989, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "5'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.364013, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "4'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.014038, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "3'", 140, "arial", 40, 1, -16777216, 0, 1 ); - tmpVariable = CreateDynamicObject( 18066, 229.000000, 86.862998, 1006.598999, -8.199999, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 ); - SetDynamicObjectMaterialText( tmpVariable, 0, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( tmpVariable, 1, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( tmpVariable, 2, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( tmpVariable, 3, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); - // Misc CreateDynamicObject(1498, 308.68, 312.10, 1002.30, 0.00, 0.00, 0.00); // Michelle's interior door CreateDynamicObject(19312, 191.16823, 1870.02869, 21.45658, 0.00, 0.00, 0.00); // Area 51