diff --git a/npcmodes/recordings/SECURITYGUARD01.rec b/npcmodes/recordings/SECURITYGUARD01.rec index d443a28..2e8d7b0 100644 Binary files a/npcmodes/recordings/SECURITYGUARD01.rec and b/npcmodes/recordings/SECURITYGUARD01.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD02.rec b/npcmodes/recordings/SECURITYGUARD02.rec index 2e8d7b0..83d2a2c 100644 Binary files a/npcmodes/recordings/SECURITYGUARD02.rec and b/npcmodes/recordings/SECURITYGUARD02.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD03.rec b/npcmodes/recordings/SECURITYGUARD03.rec index 83d2a2c..903b756 100644 Binary files a/npcmodes/recordings/SECURITYGUARD03.rec and b/npcmodes/recordings/SECURITYGUARD03.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD04.rec b/npcmodes/recordings/SECURITYGUARD04.rec index 903b756..5ccaf03 100644 Binary files a/npcmodes/recordings/SECURITYGUARD04.rec and b/npcmodes/recordings/SECURITYGUARD04.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD05.rec b/npcmodes/recordings/SECURITYGUARD05.rec index 5ccaf03..f967711 100644 Binary files a/npcmodes/recordings/SECURITYGUARD05.rec and b/npcmodes/recordings/SECURITYGUARD05.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD06.rec b/npcmodes/recordings/SECURITYGUARD06.rec index f967711..03f1d56 100644 Binary files a/npcmodes/recordings/SECURITYGUARD06.rec and b/npcmodes/recordings/SECURITYGUARD06.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD07.rec b/npcmodes/recordings/SECURITYGUARD07.rec index 03f1d56..14bcbfd 100644 Binary files a/npcmodes/recordings/SECURITYGUARD07.rec and b/npcmodes/recordings/SECURITYGUARD07.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD08.rec b/npcmodes/recordings/SECURITYGUARD08.rec index 14bcbfd..5224731 100644 Binary files a/npcmodes/recordings/SECURITYGUARD08.rec and b/npcmodes/recordings/SECURITYGUARD08.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD09.rec b/npcmodes/recordings/SECURITYGUARD09.rec index 5224731..ed154eb 100644 Binary files a/npcmodes/recordings/SECURITYGUARD09.rec and b/npcmodes/recordings/SECURITYGUARD09.rec differ diff --git a/npcmodes/recordings/SECURITYGUARD10.rec b/npcmodes/recordings/SECURITYGUARD10.rec deleted file mode 100644 index ed154eb..0000000 Binary files a/npcmodes/recordings/SECURITYGUARD10.rec and /dev/null differ diff --git a/npcmodes/secureguard.pwn b/npcmodes/secureguard.pwn index 87782cc..03d909a 100644 --- a/npcmodes/secureguard.pwn +++ b/npcmodes/secureguard.pwn @@ -29,7 +29,7 @@ new iIdleTS = 0; new iRestartTS = 0; /* ** Messages ** */ -new +new g_LeavingMessages[ ] [ ] = { { "We've secured the security truck without any conflict." }, @@ -60,13 +60,13 @@ public OnSecurityGuardUpdate( ); main( ) { } -public OnNPCModeInit( ) +public OnNPCModeInit( ) { t_NPCUpdate = SetTimer( "OnSecurityGuardUpdate", 500, true ); return 1; } -public OnNPCModeExit( ) +public OnNPCModeExit( ) { KillTimer( t_NPCUpdate ); return 1; @@ -78,7 +78,7 @@ public OnNPCDisconnect( reason[ ] ) return 1; } -public OnRecordingPlaybackEnd( ) +public OnRecordingPlaybackEnd( ) { if( b_Idle ) { // Constant idle at 2K, 2K, 2K @@ -90,7 +90,7 @@ public OnRecordingPlaybackEnd( ) return 1; } -public OnNPCSpawn( ) +public OnNPCSpawn( ) { GenerateNewPlayback( ); return 1; @@ -108,7 +108,7 @@ public OnClientMessage( color, text[ ] ) if( !b_Disabled ) { b_Disabled = true; PauseRecordingPlayback( ); - //SendChat( "I can't move my truck? What the hell..." ); + //SendChat( "I can't move my truck? What the hell..." ); } return 1; } @@ -138,13 +138,13 @@ public OnClientMessage( color, text[ ] ) return 1; } -public OnSecurityGuardUpdate( ) +public OnSecurityGuardUpdate( ) { - new + new time = gettime( ); if( !( b_Disabled || b_Provoked || b_Idle ) ) { - new + new hasAnyPlayersInfront = IsAnyPlayerInfrontOfMe( ) ; @@ -155,7 +155,7 @@ public OnSecurityGuardUpdate( ) b_Paused = true; } } - else + else { if( b_Paused == true ) { ResumeRecordingPlayback( ); @@ -196,10 +196,10 @@ stock SetMeIdleForRestart( ) { b_Idle = true; iIdleTS = 0; SendChat( "End Security Guard" ); - + if( !b_Robbed ) SendChat( g_LeavingMessages[ random( sizeof( g_LeavingMessages ) ) ] ); - else + else SendChat( g_RobbedMessages[ random( sizeof( g_RobbedMessages ) ) ] ); StopRecordingPlayback( ); @@ -218,11 +218,11 @@ stock resetNPCData( ) { } stock GenerateNewPlayback( ) { - new + new szLocation[ 16 ], iRandom; find_track: - if( ( iRandom = random( 11 ) ) == iRecentTrack ) { + if( ( iRandom = random( 4 ) ) == iRecentTrack ) { goto find_track; } @@ -244,25 +244,25 @@ stock IsAnyPlayerInfrontOfMe( ) if ( !IsPlayerConnected( i ) || !IsPlayerStreamedIn( i ) ) continue; - new + new iState = GetPlayerState( i ); if( iState == PLAYER_STATE_ONFOOT || iState == PLAYER_STATE_DRIVER ) { GetXYInfrontOfMe( 10.0, X, Y, Z ); return IsPlayerInRangeOfPoint( i, 10.0, X, Y, Z ); } - + } return 0; } stock GetXYInfrontOfMe( Float:distance, &Float: x, &Float: y, &Float: z ) { - static + static Float: angle; GetMyPos( x, y, z ); GetMyFacingAngle( angle ); x += ( distance * floatsin( -angle, degrees ) ); y += ( distance * floatcos( -angle, degrees ) ); -} \ No newline at end of file +}