move fireman to its own module and introduce more police skins

This commit is contained in:
Lorenc Pekaj 2018-11-24 03:47:20 +11:00
parent cc621872c4
commit ebbfcc59e7
5 changed files with 159 additions and 249 deletions

View File

@ -14,7 +14,6 @@
/* ** Definitions ** */ /* ** Definitions ** */
#define CLASS_CIVILIAN ( 0 ) #define CLASS_CIVILIAN ( 0 )
#define CLASS_POLICE ( 1 ) #define CLASS_POLICE ( 1 )
#define CLASS_FIREMAN ( 2 )
#define MAX_CLASS_BAN_WARNS ( 3 ) #define MAX_CLASS_BAN_WARNS ( 3 )
@ -26,8 +25,8 @@ static const
Float: default_Angle = 0.0 Float: default_Angle = 0.0
; ;
static const CLASS_NAMES [ ] [ ] = { "Civilian", "Police", "FBI", "Army", "CIA", "Fireman" }; static const CLASS_NAMES [ ] [ ] = { "Civilian", "Police", "FBI", "Army", "CIA" };
static const CLASS_COLORS [ ] = { 0xC0C0C0FF, 0x3E7EFFFF, 0x0035FFFF, 0x954BFFFF, 0x191970FF, 0xA83434FF }; static const CLASS_COLORS [ ] = { 0xC0C0C0FF, 0x3E7EFFFF, 0x0035FFFF, 0x954BFFFF, 0x191970FF };
/* ** Variables ** */ /* ** Variables ** */
static stock static stock
@ -35,8 +34,7 @@ static stock
CLASS_POLICE_RANGE [ 2 ], CLASS_POLICE_RANGE [ 2 ],
CLASS_FBI_RANGE [ 2 ], CLASS_FBI_RANGE [ 2 ],
CLASS_CIA_RANGE [ 2 ], CLASS_CIA_RANGE [ 2 ],
CLASS_FIRE_RANGE [ 2 ], CLASS_ARMY_RANGE [ 2 ]
CLASS_ARMY_RANGE
; ;
/* ** Textdraw Variables ** */ /* ** Textdraw Variables ** */
@ -54,88 +52,96 @@ new p_Class [ MAX_PLAYERS ];
hook OnScriptInit( ) hook OnScriptInit( )
{ {
/* ** CIVILIAN ** */ /* ** CIVILIAN ** */
CLASS_CIVILIAN_RANGE[ 0 ] = AddPlayerClass( 119, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 0 CLASS_CIVILIAN_RANGE[ 0 ] = AddPlayerClass( 119, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 289, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 1 AddPlayerClass( 289, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 273, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 2 AddPlayerClass( 273, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 271, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 3 AddPlayerClass( 271, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 208, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 4 AddPlayerClass( 208, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 268, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 5 AddPlayerClass( 268, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 292, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 6 AddPlayerClass( 292, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 293, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 7 AddPlayerClass( 293, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 3, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 8 AddPlayerClass( 3, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 4, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 9 AddPlayerClass( 4, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 2, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 10 AddPlayerClass( 2, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 7, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 11 AddPlayerClass( 7, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 12, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 12 AddPlayerClass( 12, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 13, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 13 AddPlayerClass( 13, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 14, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 14 AddPlayerClass( 14, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 15, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 15 AddPlayerClass( 15, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 17, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 16 AddPlayerClass( 17, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 19, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 17 AddPlayerClass( 19, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 20, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 18 AddPlayerClass( 20, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 21, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 19 AddPlayerClass( 21, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 22, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 20 AddPlayerClass( 22, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 23, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 21 AddPlayerClass( 23, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 24, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 22 AddPlayerClass( 24, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 26, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 23 AddPlayerClass( 26, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 28, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 24 AddPlayerClass( 28, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 29, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 25 AddPlayerClass( 29, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 30, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 26 AddPlayerClass( 30, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 31, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 27 AddPlayerClass( 31, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 32, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 28 AddPlayerClass( 32, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 33, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 29 AddPlayerClass( 33, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 34, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 30 AddPlayerClass( 34, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 35, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 31 AddPlayerClass( 35, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 36, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 32 AddPlayerClass( 36, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 37, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 33 AddPlayerClass( 37, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 38, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 34 AddPlayerClass( 38, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 46, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 35 AddPlayerClass( 46, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 47, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 36 AddPlayerClass( 47, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 48, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 37 AddPlayerClass( 48, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 59, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 38 AddPlayerClass( 59, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 60, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 39 AddPlayerClass( 60, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 63, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 40 AddPlayerClass( 63, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 64, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 41 AddPlayerClass( 64, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 152, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 42 AddPlayerClass( 152, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 237, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 43 AddPlayerClass( 237, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 78, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 44 AddPlayerClass( 78, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 79, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 45 AddPlayerClass( 79, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 134, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 46 AddPlayerClass( 134, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 100, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 47 AddPlayerClass( 100, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 101, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 48 AddPlayerClass( 101, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 137, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 49 AddPlayerClass( 137, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 274, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 60 AddPlayerClass( 274, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 275, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 61 AddPlayerClass( 275, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 276, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 62 AddPlayerClass( 276, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
CLASS_CIVILIAN_RANGE[ 1 ] = AddPlayerClass( 308, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 63 AddPlayerClass( 308, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 277, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 278, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
CLASS_CIVILIAN_RANGE[ 1 ] = AddPlayerClass( 279, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
/* ** FBI ** */ /* ** FBI ** */
CLASS_FBI_RANGE[ 0 ] = AddPlayerClass( 286, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 50 CLASS_FBI_RANGE[ 0 ] = AddPlayerClass( 286, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 71, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 51 AddPlayerClass( 71, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
CLASS_FBI_RANGE[ 1 ] = AddPlayerClass( 285, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 52 CLASS_FBI_RANGE[ 1 ] = AddPlayerClass( 285, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
/* ** ARMY ** */ /* ** ARMY ** */
CLASS_ARMY_RANGE = AddPlayerClass( 287, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 53 CLASS_ARMY_RANGE[ 0 ] = AddPlayerClass( 191, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
CLASS_ARMY_RANGE[ 1 ] = AddPlayerClass( 287, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
/* ** CIA ** */ /* ** CIA ** */
CLASS_CIA_RANGE[ 0 ] = AddPlayerClass( 303, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 54 CLASS_CIA_RANGE[ 0 ] = AddPlayerClass( 303, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 304, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 55 AddPlayerClass( 304, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 55
CLASS_CIA_RANGE[ 1 ] = AddPlayerClass( 305, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 56 CLASS_CIA_RANGE[ 1 ] = AddPlayerClass( 305, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
/* ** FIRE ** */
CLASS_FIRE_RANGE[ 0 ] = AddPlayerClass( 277, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 57
AddPlayerClass( 278, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 58
CLASS_FIRE_RANGE[ 1 ] = AddPlayerClass( 279, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 59
/* ** POLICE ** */ /* ** POLICE ** */
CLASS_POLICE_RANGE[ 0 ] = AddPlayerClass( 265, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 66 CLASS_POLICE_RANGE[ 0 ] = AddPlayerClass( 265, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 266, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 67 AddPlayerClass( 266, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 267, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 68 AddPlayerClass( 267, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 306, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 69 AddPlayerClass( 280, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 280, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 70 AddPlayerClass( 281, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 281, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 71 AddPlayerClass( 282, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 284, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 72 AddPlayerClass( 283, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
CLASS_POLICE_RANGE[ 1 ] = AddPlayerClass( 307, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 ); // 73 AddPlayerClass( 284, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 288, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 300, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 301, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 302, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 306, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 307, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 309, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
AddPlayerClass( 310, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
CLASS_POLICE_RANGE[ 1 ] = AddPlayerClass( 311, default_X, default_Y, default_Z, default_Angle, 0, 0, 0, 0, 0, 0 );
// Textdraws // Textdraws
g_classBoxTD = TextDrawCreate(40.000000, 170.000000, "_"); g_classBoxTD = TextDrawCreate(40.000000, 170.000000, "_");
@ -206,12 +212,6 @@ hook OnScriptInit( )
"- Hidden from radar~n~" \ "- Hidden from radar~n~" \
"~r~~h~- Requires 15,000 XP or more" ); "~r~~h~- Requires 15,000 XP or more" );
} }
case 5: {
strcat( szLargeString, "- Protect the city from fires~n~" \
"- Firetrucks able to extinguish fires~n~"\
"- Able to rob stores and players~n~" \
"~r~~h~- Requires 1,000 XP or more" );
}
} }
g_classTextdrawDescrip[ i ] = TextDrawCreate(43.000000, 171.000000, szLargeString); g_classTextdrawDescrip[ i ] = TextDrawCreate(43.000000, 171.000000, szLargeString);
@ -316,7 +316,7 @@ hook OnPlayerRequestClass( playerid, classid )
p_inCIA{ playerid } = false; p_inCIA{ playerid } = false;
ShowPlayerClassTextdraw( playerid, 2 ); ShowPlayerClassTextdraw( playerid, 2 );
} }
else if ( classid == CLASS_ARMY_RANGE ) else if ( CLASS_ARMY_RANGE[ 0 ] <= classid <= CLASS_ARMY_RANGE[ 1 ] )
{ {
p_Class[ playerid ] = ( CLASS_POLICE ); p_Class[ playerid ] = ( CLASS_POLICE );
SetPlayerColor( playerid, COLOR_ARMY ); SetPlayerColor( playerid, COLOR_ARMY );
@ -336,16 +336,6 @@ hook OnPlayerRequestClass( playerid, classid )
p_inCIA{ playerid } = true; p_inCIA{ playerid } = true;
ShowPlayerClassTextdraw( playerid, 4 ); ShowPlayerClassTextdraw( playerid, 4 );
} }
else if ( CLASS_FIRE_RANGE[ 0 ] <= classid <= CLASS_FIRE_RANGE[ 1 ] )
{
p_Class[ playerid ] = ( CLASS_FIREMAN );
SetPlayerColor( playerid, COLOR_FIREMAN );
//SetPlayerTeam( playerid, NO_TEAM );
p_inFBI{ playerid } = false;
p_inArmy{ playerid } = false;
p_inCIA{ playerid } = false;
ShowPlayerClassTextdraw( playerid, 6 );
}
return 1; return 1;
} }
@ -409,9 +399,6 @@ stock IsPlayerClassApproved( playerid ) {
if ( IsPlayerCIA( playerid ) && total_experience < 15000.0 ) if ( IsPlayerCIA( playerid ) && total_experience < 15000.0 )
return SendClientMessage( playerid, -1, ""COL_RED"[ERROR]"COL_WHITE" You need 15,000 Total XP to use this class." ), 0; return SendClientMessage( playerid, -1, ""COL_RED"[ERROR]"COL_WHITE" You need 15,000 Total XP to use this class." ), 0;
if ( IsPlayerFireman( playerid ) && total_experience < 1000.0 )
return SendClientMessage( playerid, -1, ""COL_RED"[ERROR]"COL_WHITE" You need 1,000 Total XP to use this class." ), 0;
// job not set // job not set
if ( ! p_JobSet{ playerid } ) // || !p_CitySet{ playerid } ) if ( ! p_JobSet{ playerid } ) // || !p_CitySet{ playerid } )
return SendClientMessage( playerid, -1, ""COL_RED"[ERROR]"COL_WHITE" You must ensure your job have been properly set." ), 0; // and city return SendClientMessage( playerid, -1, ""COL_RED"[ERROR]"COL_WHITE" You must ensure your job have been properly set." ), 0; // and city
@ -439,3 +426,54 @@ stock ShowPlayerClassTextdraw( playerid, classid ) {
TextDrawShowForPlayer( playerid, g_classTextdrawDescrip[ classid ] ); TextDrawShowForPlayer( playerid, g_classTextdrawDescrip[ classid ] );
TextDrawShowForPlayer( playerid, g_classTextdrawName[ classid ] ); TextDrawShowForPlayer( playerid, g_classTextdrawName[ classid ] );
} }
stock IsPlayerFBI( playerid )
{
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 286, 71, 285: {
return IsPlayerSpawned( playerid ) && IsPlayerVIPSkinToggled( playerid ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid;
}
}
return false;
}
stock IsPlayerCIA( playerid )
{
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 303 .. 305: {
return IsPlayerSpawned( playerid ) && IsPlayerVIPSkinToggled( playerid ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid;
}
}
return false;
}
stock IsPlayerArmy( playerid ) {
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 191, 287: {
return IsPlayerSpawned( playerid ) && IsPlayerVIPSkinToggled( playerid ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid;
}
}
return false;
}
stock IsPlayerPolice( playerid )
{
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 265 .. 267, 280 .. 288, 300 .. 302, 306, 307, 309 .. 311: {
return IsPlayerSpawned( playerid ) && IsPlayerVIPSkinToggled( playerid ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid;
}
}
return false;
}

View File

@ -55,7 +55,7 @@ hook OnPlayerUpdateEx( playerid )
GetPlayerKeys( playerid, iKeys, tmpVariable, tmpVariable ); GetPlayerKeys( playerid, iKeys, tmpVariable, tmpVariable );
// Taking Out Fires // Taking Out Fires
if ( p_Class[ playerid ] == CLASS_FIREMAN && ( iKeys & KEY_FIRE ) || ( iKeys & KEY_WALK ) ) if ( ( iKeys & KEY_FIRE ) || ( iKeys & KEY_WALK ) )
{ {
new new
using_firetruck = GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 407; using_firetruck = GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 407;
@ -90,7 +90,7 @@ hook OnPlayerUpdateEx( playerid )
if ( g_fireData[ i ] [ E_HEALTH ] <= 0.0 ) if ( g_fireData[ i ] [ E_HEALTH ] <= 0.0 )
{ {
ach_HandleExtinguishedFires( playerid ); ach_HandleExtinguishedFires( playerid );
SendClientMessageToFireman( -1, "{A83434}[FIREMAN]"COL_WHITE" %s(%d) has earned "COL_GOLD"%s"COL_WHITE" for extinguishing a house fire.", ReturnPlayerName( playerid ), playerid, cash_format( FIRE_EXTINGUISH_PAYOUT ) ); SendClientMessageToAllFormatted( -1, "{A83434}[FIREMAN]"COL_WHITE" %s(%d) has earned "COL_GOLD"%s"COL_WHITE" for extinguishing a house fire.", ReturnPlayerName( playerid ), playerid, cash_format( FIRE_EXTINGUISH_PAYOUT ) );
GivePlayerScore( playerid, 2 ); GivePlayerScore( playerid, 2 );
//GivePlayerExperience( playerid, E_FIREMAN ); //GivePlayerExperience( playerid, E_FIREMAN );
GivePlayerCash( playerid, FIRE_EXTINGUISH_PAYOUT ); GivePlayerCash( playerid, FIRE_EXTINGUISH_PAYOUT );
@ -137,9 +137,6 @@ hook OnPlayerDriveVehicle( playerid, vehicleid )
CMD:firetracker( playerid, params[ ] ) cmd_fires( playerid, params ); CMD:firetracker( playerid, params[ ] ) cmd_fires( playerid, params );
CMD:fires( playerid, params[ ] ) CMD:fires( playerid, params[ ] )
{ {
if ( p_Class[ playerid ] != CLASS_FIREMAN )
return SendError( playerid, "You are not a fireman." );
p_FireTracker{ playerid } = ! p_FireTracker{ playerid }; p_FireTracker{ playerid } = ! p_FireTracker{ playerid };
if ( p_FireTracker{ playerid } ) if ( p_FireTracker{ playerid } )
@ -184,7 +181,7 @@ stock HouseFire_Create( )
} }
// show on radar when it is created // show on radar when it is created
foreach ( new playerid : Player ) if ( GetPlayerClass( playerid ) == CLASS_FIREMAN && p_FireTracker{ playerid } ) { foreach ( new playerid : Player ) if ( p_FireTracker{ playerid } ) {
UpdatePlayerFireTracker( playerid ); UpdatePlayerFireTracker( playerid );
} }
return 1; return 1;

View File

@ -186,3 +186,8 @@ CMD:passivelist( playerid, params[ ])
stock IsPlayerSettingToggled( playerid, settingid ) { stock IsPlayerSettingToggled( playerid, settingid ) {
return p_PlayerSettings[ playerid ] { settingid }; return p_PlayerSettings[ playerid ] { settingid };
} }
stock IsPlayerVIPSkinToggled( playerid ) {
return p_PlayerSettings[ playerid ] { SETTING_VIPSKIN };
}

View File

@ -50,6 +50,7 @@ new const
{ -2626.2156, 1398.626, 7.1016, 204.5252, 0, 0 }, { -2626.2156, 1398.626, 7.1016, 204.5252, 0, 0 },
{ -2626.2156, 1398.626, 7.1016, 204.5252, 0, 0 }, { -2626.2156, 1398.626, 7.1016, 204.5252, 0, 0 },
{ -2587.4861, 212.0579, 9.0733, 9.073300, 0, 0 }, { -2587.4861, 212.0579, 9.0733, 9.073300, 0, 0 },
{ -2026.3287, 67.1439, 28.6916, 270.0000, 0, 0 },
{ -2658.0764, 634.333, 14.4531, 180.0000, 0, 0 } { -2658.0764, 634.333, 14.4531, 180.0000, 0, 0 }
}, },
@ -63,6 +64,7 @@ new const
{ 2451.2332, 2347.0044, 12.1635, 112.7286, 0, 0 }, { 2451.2332, 2347.0044, 12.1635, 112.7286, 0, 0 },
{ 1480.3296, 2250.1125, 11.0291, 279.2149, 0, 0 }, { 1480.3296, 2250.1125, 11.0291, 279.2149, 0, 0 },
{ 2143.3252, 2840.4441, 10.8203, 139.9116, 0, 0 }, { 2143.3252, 2840.4441, 10.8203, 139.9116, 0, 0 },
{ 1744.56240, 2079.43, 10.8203, 172.1325, 0, 0 },
{ 1615.62490, 1840.19, 10.9696, 0.000000, 0, 0 } { 1615.62490, 1840.19, 10.9696, 0.000000, 0, 0 }
}, },
@ -78,13 +80,7 @@ new const
{ 1935.7644, -1794.6068, 13.5469, 295.5515, 0, 0 }, { 1935.7644, -1794.6068, 13.5469, 295.5515, 0, 0 },
{ 1371.4569, -1090.6387, 24.5459, 92.84640, 0, 0 }, { 1371.4569, -1090.6387, 24.5459, 92.84640, 0, 0 },
{ 2298.4055, -1500.3264, 25.3047, 199.6940, 0, 0 }, { 2298.4055, -1500.3264, 25.3047, 199.6940, 0, 0 },
{ 1178.0417, -1323.6000, 14.1005, 285.5701, 0, 0 } { 1178.0417, -1323.6000, 14.1005, 285.5701, 0, 0 },
},
g_FiremanSpawns [ MAX_CITIES ] [ E_RANDOM_SPAWNS ] =
{
{ -2026.3287, 67.1439, 28.6916, 270.0000, 0, 0 },
{ 1744.56240, 2079.43, 10.8203, 172.1325, 0, 0 },
{ 1757.44350, -1456.7, 13.5469, 282.4133, 0, 0 } { 1757.44350, -1456.7, 13.5469, 282.4133, 0, 0 }
}, },

View File

@ -1659,17 +1659,8 @@ public OnPlayerSpawn( playerid )
if ( !bSpectated ) if ( !bSpectated )
{ {
switch( p_Class[ playerid ] ) if ( GetPlayerClass( playerid ) == CLASS_POLICE ) {
{ GivePlayerLeoWeapons( playerid );
case CLASS_POLICE: GivePlayerLeoWeapons( playerid );
case CLASS_FIREMAN:
{
GivePlayerWeapon( playerid, 22, 250 );
GivePlayerWeapon( playerid, 25, 50 );
GivePlayerWeapon( playerid, 9, 1 );
GivePlayerWeapon( playerid, 42, 0xFFFF );
}
} }
} }
@ -2558,12 +2549,6 @@ public OnPlayerText( playerid, text[ ] )
return 0; return 0;
} }
else if ( p_Class[ playerid ] == CLASS_FIREMAN )
{
SendClientMessageToFireman( -1, "{A83434}<Fireman Radio> %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, text[ 1 ] );
return 0;
}
else if ( p_Class[ playerid ] == CLASS_CIVILIAN && p_GangID[ playerid ] != INVALID_GANG_ID ) else if ( p_Class[ playerid ] == CLASS_CIVILIAN && p_GangID[ playerid ] != INVALID_GANG_ID )
{ {
SendClientMessageToGang( p_GangID[ playerid ], g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], "<Gang Chat> %s(%d):{FFFFFF} %s", ReturnPlayerName( playerid ), playerid, text[ 1 ] ); SendClientMessageToGang( p_GangID[ playerid ], g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], "<Gang Chat> %s(%d):{FFFFFF} %s", ReturnPlayerName( playerid ), playerid, text[ 1 ] );
@ -2948,10 +2933,6 @@ CMD:t( playerid, params[ ] )
} }
SendClientMessageToCops( -1, ""COL_BLUE"<Police Radio> %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, szBigString ); SendClientMessageToCops( -1, ""COL_BLUE"<Police Radio> %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, szBigString );
} }
else if ( p_Class[ playerid ] == CLASS_FIREMAN )
{
SendClientMessageToFireman( -1, "{A83434}<Fireman Radio> %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, msg );
}
} }
return 1; return 1;
} }
@ -4090,7 +4071,7 @@ CMD:idof( playerid, params[ ] )
CMD:playercolor( playerid, params[ ] ) return cmd_pc( playerid, params ); CMD:playercolor( playerid, params[ ] ) return cmd_pc( playerid, params );
CMD:pc( playerid, params[ ] ) CMD:pc( playerid, params[ ] )
{ {
ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_LIST, "{FFFFFF}Player Colors", "Innocent\n{FFEC41}Low Suspect\n"COL_ORANGE"Wanted\n{F83245}Most Wanted\n{3E7EFF}Police\n{0035FF}F.B.I\n{191970}C.I.A\n{954BFF}Army\n{A83434}Fireman\n"COL_PINK"Admin On Duty\n"COL_GREY"Other Colors Are Gang Colors", "Okay", "" ); ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_LIST, "{FFFFFF}Player Colors", "Innocent\n{FFEC41}Low Suspect\n"COL_ORANGE"Wanted\n{F83245}Most Wanted\n{3E7EFF}Police\n{0035FF}F.B.I\n{191970}C.I.A\n{954BFF}Army\n"COL_PINK"Admin On Duty\n"COL_GREY"Other Colors Are Gang Colors", "Okay", "" );
return 1; return 1;
} }
@ -5043,7 +5024,7 @@ CMD:tips( playerid, params[ ] )
CMD:commands( playerid, params[ ] ) return cmd_cmds( playerid, params ); CMD:commands( playerid, params[ ] ) return cmd_cmds( playerid, params );
CMD:cmds( playerid, params[ ] ) CMD:cmds( playerid, params[ ] )
{ {
ShowPlayerDialog( playerid, DIALOG_CMDS, DIALOG_STYLE_LIST, "{FFFFFF}Commands", "Basic Commands\nMain Commands\nCivilian Commands\nShop/Item Commands\nPolice Commands\nFireman Commands\nVehicle Commands\nHouse Commands\nMiscellaneous Commands\n"COL_GOLD"V.I.P Commands", "Okay", "" ); ShowPlayerDialog( playerid, DIALOG_CMDS, DIALOG_STYLE_LIST, "{FFFFFF}Commands", "Basic Commands\nMain Commands\nCivilian Commands\nShop/Item Commands\nPolice Commands\nVehicle Commands\nHouse Commands\nMiscellaneous Commands\n"COL_GOLD"V.I.P Commands", "Okay", "" );
return 1; return 1;
} }
@ -5281,20 +5262,10 @@ CMD:911( playerid, params[ ] )
GetZoneFromCoordinates( szLocation, X, Y, Z ); GetZoneFromCoordinates( szLocation, X, Y, Z );
Get2DCity( szCity, X, Y, Z ); Get2DCity( szCity, X, Y, Z );
if ( strmatch( params, "LEO" ) )
{
p_AntiSpammyTS[ playerid ] = g_iTime + 15; p_AntiSpammyTS[ playerid ] = g_iTime + 15;
SendClientMessageToCops( -1, ""COL_BLUE"[911]"COL_GREY" %s(%d) is asking for a law enforcement officer near %s in %s!", ReturnPlayerName( playerid ), playerid, szLocation, szCity ); SendClientMessageToCops( -1, ""COL_BLUE"[911]"COL_GREY" %s(%d) is asking for a law enforcement officer near %s in %s!", ReturnPlayerName( playerid ), playerid, szLocation, szCity );
SendServerMessage( playerid, "You have asked for a leo enforcement officer at your current location." ); SendServerMessage( playerid, "You have asked for a leo enforcement officer at your current location." );
} }
else if ( strmatch( params, "EFB" ) )
{
p_AntiSpammyTS[ playerid ] = g_iTime + 15;
SendClientMessageToFireman( -1, "{A83434}[911]"COL_GREY" %s(%d) is asking for a fire brigade near %s in %s!", ReturnPlayerName( playerid ), playerid, szLocation, szCity );
SendServerMessage( playerid, "You have asked for a fire brigade at your current location." );
}
else SendUsage( playerid, "/911 [LEO/EFB]" );
}
return 1; return 1;
} }
@ -5482,7 +5453,7 @@ CMD:location( playerid, params[ ] )
pID pID
; ;
if ( p_Class[ playerid ] == CLASS_CIVILIAN || p_Class[ playerid ] == CLASS_FIREMAN ) return SendError( playerid, "This is restricted to police only." ); if ( p_Class[ playerid ] == CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to police only." );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/loc(ation) [PLAYER_ID]" ); else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/loc(ation) [PLAYER_ID]" );
else if ( ! IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "This player isn't connected!" ); else if ( ! IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "This player isn't connected!" );
else if ( ! IsPlayerSpawned( pID ) ) return SendError( playerid, "The player selected isn't spawned." ); else if ( ! IsPlayerSpawned( pID ) ) return SendError( playerid, "The player selected isn't spawned." );
@ -6631,16 +6602,6 @@ public OnPlayerDriveVehicle( playerid, vehicleid )
return 1; return 1;
} }
} }
if ( p_Class[ playerid ] != CLASS_FIREMAN )
{
if ( model == 407 || model == 544 )
{
SyncObject( playerid, 1 );
//RemovePlayerFromVehicle( playerid );
SendError( playerid, "Firemen are only authorized to use this." );
return 1;
}
}
} }
return 1; return 1;
} }
@ -8779,10 +8740,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
""COL_GREY"/bruteforce{FFFFFF} - Brute forces a houses' password." ); ""COL_GREY"/bruteforce{FFFFFF} - Brute forces a houses' password." );
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Police Commands", szCMDS, "Okay", "Back" ); ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Police Commands", szCMDS, "Okay", "Back" );
} }
case 5: { case 5:
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Fireman Commands", ""COL_GREY"/firetracker"COL_WHITE" - Displays a tracker of active fires in a list.\n"COL_GREY"/rfiretracker"COL_WHITE" - Hides the fire tracker.", "Okay", "Back" );
}
case 7:
{ {
szCMDS[ 0 ] = '\0'; szCMDS[ 0 ] = '\0';
strcat( szCMDS, ""COL_GOLD"General Vehicle Commands\n\n"\ strcat( szCMDS, ""COL_GOLD"General Vehicle Commands\n\n"\
@ -8798,7 +8756,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
""COL_GREY"/v sell{FFFFFF} - Sells the vehicle to 50% of its original price (requires the player to be inside it)." ); ""COL_GREY"/v sell{FFFFFF} - Sells the vehicle to 50% of its original price (requires the player to be inside it)." );
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Vehicle Commands", szCMDS, "Okay", "Back" ); ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Vehicle Commands", szCMDS, "Okay", "Back" );
} }
case 8: case 6:
{ {
szCMDS[ 0 ] = '\0'; szCMDS[ 0 ] = '\0';
strcat( szCMDS, ""COL_GREY"/h{FFFFFF} - Shows the commands for buyable houses.\n"\ strcat( szCMDS, ""COL_GREY"/h{FFFFFF} - Shows the commands for buyable houses.\n"\
@ -8808,7 +8766,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
""COL_GREY"/h sell{FFFFFF} - Sells the house to 50% of its original price (requires the player to be inside the house)." ); ""COL_GREY"/h sell{FFFFFF} - Sells the house to 50% of its original price (requires the player to be inside the house)." );
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}House Commands", szCMDS, "Okay", "Back" ); ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}House Commands", szCMDS, "Okay", "Back" );
} }
case 9: case 7:
{ {
szCMDS[ 0 ] = '\0'; szCMDS[ 0 ] = '\0';
strcat( szCMDS, ""COL_GREY"/perks{FFFFFF} - A menu where you can benefit your gameplay and waste some XP.\n"\ strcat( szCMDS, ""COL_GREY"/perks{FFFFFF} - A menu where you can benefit your gameplay and waste some XP.\n"\
@ -8822,7 +8780,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
""COL_GREY"/moviemode{FFFFFF} - Toggles movie mode so you can record without all the text on the screen." ); ""COL_GREY"/moviemode{FFFFFF} - Toggles movie mode so you can record without all the text on the screen." );
ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Miscellaneous Commands", szCMDS, "Okay", "Back" ); ShowPlayerDialog( playerid, DIALOG_CMDS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Miscellaneous Commands", szCMDS, "Okay", "Back" );
} }
case 10: case 8:
{ {
if ( p_VIPLevel[ playerid ] < VIP_REGULAR ) return SendError( playerid, "You are not a V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" ); if ( p_VIPLevel[ playerid ] < VIP_REGULAR ) return SendError( playerid, "You are not a V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" );
cmd_vipcmds( playerid, "" ); cmd_vipcmds( playerid, "" );
@ -9962,9 +9920,6 @@ function SetPlayerRandomSpawn( playerid )
new new
city = p_SpawningCity{ playerid } >= MAX_CITIES ? random( MAX_CITIES ) : p_SpawningCity{ playerid }; city = p_SpawningCity{ playerid } >= MAX_CITIES ? random( MAX_CITIES ) : p_SpawningCity{ playerid };
if ( p_Class[ playerid ] == CLASS_FIREMAN )
return SetPlayerPos( playerid, g_FiremanSpawns[ city ] [ RANDOM_SPAWN_X ], g_FiremanSpawns[ city ] [ RANDOM_SPAWN_Y ], g_FiremanSpawns[ city ] [ RANDOM_SPAWN_Z ] ), SetPlayerInterior( playerid, g_FiremanSpawns[ city ] [ RANDOM_SPAWN_INTERIOR ] ), SetPlayerVirtualWorld( playerid, g_FiremanSpawns[ city ] [ RANDOM_SPAWN_WORLD ] ), SetPlayerFacingAngle( playerid, g_FiremanSpawns[ city ] [ RANDOM_SPAWN_A ] ), 1;
if ( p_inArmy{ playerid } == true ) if ( p_inArmy{ playerid } == true )
return SetPlayerPos( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_X ], g_ArmySpawns[ city ] [ RANDOM_SPAWN_Y ], g_ArmySpawns[ city ] [ RANDOM_SPAWN_Z ] ), SetPlayerInterior( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_INTERIOR ] ), SetPlayerVirtualWorld( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_WORLD ] ), SetPlayerFacingAngle( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_A ] ), 1; return SetPlayerPos( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_X ], g_ArmySpawns[ city ] [ RANDOM_SPAWN_Y ], g_ArmySpawns[ city ] [ RANDOM_SPAWN_Z ] ), SetPlayerInterior( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_INTERIOR ] ), SetPlayerVirtualWorld( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_WORLD ] ), SetPlayerFacingAngle( playerid, g_ArmySpawns[ city ] [ RANDOM_SPAWN_A ] ), 1;
@ -10280,7 +10235,6 @@ stock SetPlayerColorToTeam( playerid )
if ( p_inCIA{ playerid } ) SetPlayerColor( playerid, COLOR_CIA ); if ( p_inCIA{ playerid } ) SetPlayerColor( playerid, COLOR_CIA );
if ( p_inArmy{ playerid } ) SetPlayerColor( playerid, COLOR_ARMY ); if ( p_inArmy{ playerid } ) SetPlayerColor( playerid, COLOR_ARMY );
} }
case CLASS_FIREMAN: SetPlayerColor( playerid, COLOR_FIREMAN );
default: default:
{ {
new new
@ -10325,74 +10279,6 @@ stock SetPlayerColorToTeam( playerid )
return 0; return 0;
}*/ }*/
stock IsPlayerFBI( playerid )
{
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 286, 71, 285: {
if ( IsPlayerSpawned( playerid ) && IsPlayerSettingToggled( playerid, SETTING_VIPSKIN ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid ) {
return false;
}
return true;
}
}
return false;
}
stock IsPlayerCIA( playerid )
{
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 303 .. 305: {
if ( IsPlayerSpawned( playerid ) && IsPlayerSettingToggled( playerid, SETTING_VIPSKIN ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid ) {
return false;
}
return true;
}
}
return false;
}
stock IsPlayerArmy( playerid ) {
return GetPlayerSkin( playerid ) == 287;
}
stock IsPlayerPolice( playerid )
{
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 265, 266, 267, 306, 307, 280, 281, 284: {
if ( IsPlayerSpawned( playerid ) && IsPlayerSettingToggled( playerid, SETTING_VIPSKIN ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid ) {
return false;
}
return true;
}
}
return false;
}
stock IsPlayerFireman( playerid )
{
new
skinid = GetPlayerSkin( playerid );
switch( skinid ) {
case 277, 278, 279: {
if ( IsPlayerSpawned( playerid ) && IsPlayerSettingToggled( playerid, SETTING_VIPSKIN ) && p_VIPLevel[ playerid ] && p_LastSkin[ playerid ] == skinid ) {
return false;
}
return true;
}
}
return false;
}
stock PutPlayerInEmptyVehicleSeat( vehicleid, playerid ) stock PutPlayerInEmptyVehicleSeat( vehicleid, playerid )
{ {
new new
@ -12980,18 +12866,6 @@ stock SendClientMessageToCops( colour, format[ ], va_args<> ) // Conversion to f
return 1; return 1;
} }
stock SendClientMessageToFireman( colour, format[ ], va_args<> ) // Conversion to foreach 14 stuffed the define, not sure how...
{
static
out[ 144 ];
va_format( out, sizeof( out ), format, va_start<2> );
foreach ( new i : Player ) if ( p_Class[ i ] == CLASS_FIREMAN ) {
SendClientMessage( i, colour, out );
}
return 1;
}
stock GetPlayerOutsidePos( playerid, &Float: X, &Float: Y, &Float: Z ) // gets the player position, if interior then the last checkpoint position stock GetPlayerOutsidePos( playerid, &Float: X, &Float: Y, &Float: Z ) // gets the player position, if interior then the last checkpoint position
{ {