From c13bfb4716b410dac5af3927cf5fb6f180597d85 Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Tue, 18 Sep 2018 20:40:38 +0100 Subject: [PATCH] kicks the player out of the vehicle when the owner /v bring it. --- gamemodes/sf-cnr.pwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 767ce0f..cb5d6cc 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -5536,7 +5536,6 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b if ( p_Class[ issuerid ] == CLASS_POLICE && p_inFBI{ issuerid } && p_inCIA{ issuerid } && !p_inArmy{ issuerid } ) SetPlayerColor( issuerid, setAlpha( COLOR_CIA, 0xFF ) ), p_VisibleOnRadar[ issuerid ] = g_iTime + 2; - // alert admins new attack_difference = GetTickCount( ) - p_PlayerAltBindTick[ playerid ]; @@ -16114,6 +16113,15 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) if ( GetPlayerCash( playerid ) < 10000 ) return SendError( playerid, "You need $10,000 to bring your vehicle to you." ); + foreach( new i : Player ) + { + if ( GetPlayerVehicleID( i ) == g_vehicleData[ playerid ] [ id ] [ E_VEHICLE_ID ] ) + { + SetPlayerPos( i, X, Y, ( Z + 0.5 ) ); + SendServerMessage( i, "You have been thrown out of the vehicle as the owner has teleported it away!" ); + } + } + new Float: nodeX, Float: nodeY, Float: nodeZ, Float: nextX, Float: nextY, nodeid = NearestNodeFromPoint( X, Y, Z ),