if (SVT_Crack_Crash)
{
Ped HisPed = PLAYER::GET_PLAYER_PED(selectedPlayer);
Vector3 their_Pos = ENTITY::GET_ENTITY_COORDS(HisPed, false);
Vector3 your_Pos = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false);
CAM::_ANIMATE_GAMEPLAY_CAM_ZOOM(0.0f, 200.0f);
Vector3 Cords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(selectedPlayer), true);
bool ProtectCam = true;
int CrashTimer = 0;
STREAMING::REQUEST_MODEL(0xC703DB5F);
if (ProtectCam && GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(your_Pos.x, your_Pos.y, your_Pos.z, their_Pos.x, their_Pos.y, their_Pos.z, false) > 300.0f)
{
CrashTimer += 1;
ShowMessageOnScreen("~r~WARNING~s~: Crashing ~r~%s~s~ Stand Back!!", PLAYER::GET_PLAYER_NAME(selectedPlayer));
RemoveCash = true;
TAKE_PLAYER_RP(-1);
SendText("~g~Poison CE ~s~Has Taken ~r~-1 RP");
AddCoordExplosion(Cords.x, Cords.y, Cords.z, BOAT, false, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
if (CrashTimer >= 175 && !NETWORK::NETWORK_IS_PLAYER_CONNECTED(selectedPlayer))
{
RemoveCash = false;
SVT_Crack_Crash = false;
}
else
{
}
}
}
int Crash_Veh(Hash VehicleName, float Location, float Location2, float Location3, float haiding, int n, int y)
{
Hash VehicleHash = (VehicleName);
Vehicle Handle = 0;
if (!STREAMING::HAS_MODEL_LOADED(VehicleHash))
STREAMING::REQUEST_MODEL(VehicleHash);
if (STREAMING::HAS_MODEL_LOADED(VehicleHash))
{
Handle = VEHICLE::CREATE_VEHICLE(VehicleHash, Location, Location2, Location3, haiding, n, y);
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(VehicleHash);
}
return Handle;
}
{
Ped HisPed = PLAYER::GET_PLAYER_PED(selectedPlayer);
Vector3 their_Pos = ENTITY::GET_ENTITY_COORDS(HisPed, false);
Vector3 your_Pos = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false);
CAM::_ANIMATE_GAMEPLAY_CAM_ZOOM(0.0f, 200.0f);
Vector3 Cords = ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(selectedPlayer), true);
bool ProtectCam = true;
int CrashTimer = 0;
STREAMING::REQUEST_MODEL(0xC703DB5F);
if (ProtectCam && GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(your_Pos.x, your_Pos.y, your_Pos.z, their_Pos.x, their_Pos.y, their_Pos.z, false) > 300.0f)
{
CrashTimer += 1;
ShowMessageOnScreen("~r~WARNING~s~: Crashing ~r~%s~s~ Stand Back!!", PLAYER::GET_PLAYER_NAME(selectedPlayer));
RemoveCash = true;
TAKE_PLAYER_RP(-1);
SendText("~g~Poison CE ~s~Has Taken ~r~-1 RP");
AddCoordExplosion(Cords.x, Cords.y, Cords.z, BOAT, false, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
Crash_Veh(0xC703DB5F, Cords.x, Cords.y, Cords.z + 5.0f, ENTITY::GET_ENTITY_HEADING(selectedPlayer), true, true);
if (CrashTimer >= 175 && !NETWORK::NETWORK_IS_PLAYER_CONNECTED(selectedPlayer))
{
RemoveCash = false;
SVT_Crack_Crash = false;
}
else
{
}
}
}
int Crash_Veh(Hash VehicleName, float Location, float Location2, float Location3, float haiding, int n, int y)
{
Hash VehicleHash = (VehicleName);
Vehicle Handle = 0;
if (!STREAMING::HAS_MODEL_LOADED(VehicleHash))
STREAMING::REQUEST_MODEL(VehicleHash);
if (STREAMING::HAS_MODEL_LOADED(VehicleHash))
{
Handle = VEHICLE::CREATE_VEHICLE(VehicleHash, Location, Location2, Location3, haiding, n, y);
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(VehicleHash);
}
return Handle;
}