ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1968

Vehicle Checker

by Hynodgy - 05-13-2020 - 11:43 PM
#1
Hi, i'm posting a vehicle checker. I'm not really sure if this has been posted already, so don't judge me if yes. I find this handy and anyone else probably will. Basically, it checks if you are in spawned vehicle and if you are, the vehicle's blip will disappear until you get out. So your player blip is not over the spawned vehicle blip. I've created this many months ago and it's so easy, so no hide tags needed, enjoy.


Code:
bool BlipChecker = true;
Vehicle SpawnedVehicle[100];
int NumberSpawned = 0;

//Make Sure To Add This Also To Your Spawner
Blip VehicleBlip[100];
//

//Looping
if (BlipChecker)
{
for (int i = 0; i < NumberSpawned; i++)
{
if (ENTITY::DOES_ENTITY_EXIST(SpawnedVehicle[i]))
{
if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), SpawnedVehicle[i], 0))
{
UI::SET_BLIP_ALPHA(VehicleBlip[i], 0);
}
else if (!PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), SpawnedVehicle[i], 0))
{
UI::SET_BLIP_ALPHA(VehicleBlip[i], 255);
}
}
}
}


Serozoid - FREE & FOREVER !
Reply
#2
(05-13-2020 - 11:43 PM)Hynodgy Wrote: Hi, i'm posting a vehicle checker. I'm not really sure if this has been posted already, so don't judge me if yes. I find this handy and anyone else probably will. Basically, it checks if you are in spawned vehicle and if you are, the vehicle's blip will disappear until you get out. So your player blip is not over the spawned vehicle blip. I've created this many months ago and it's so easy, so no hide tags needed, enjoy.


Code:
bool BlipChecker = true;
Vehicle SpawnedVehicle[100];
int NumberSpawned = 0;

//Make Sure To Add This Also To Your Spawner
Blip VehicleBlip[100];
//

//Looping
if (BlipChecker)
{
for (int i = 0; i < NumberSpawned; i++)
{
if (ENTITY::DOES_ENTITY_EXIST(SpawnedVehicle[i]))
{
if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), SpawnedVehicle[i], 0))
{
UI::SET_BLIP_ALPHA(VehicleBlip[i], 0);
}
else if (!PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), SpawnedVehicle[i], 0))
{
UI::SET_BLIP_ALPHA(VehicleBlip[i], 255);
}
}
}
}


Serozoid - FREE & FOREVER !
nice i think i dont see this before
Disc = 0xemiil
Reply
#3
nice one never seen this before thanks for this
Reply
#4
(05-13-2020 - 11:43 PM)Hynodgy Wrote: Hi, i'm posting a vehicle checker. I'm not really sure if this has been posted already, so don't judge me if yes. I find this handy and anyone else probably will. Basically, it checks if you are in spawned vehicle and if you are, the vehicle's blip will disappear until you get out. So your player blip is not over the spawned vehicle blip. I've created this many months ago and it's so easy, so no hide tags needed, enjoy.


Code:
bool BlipChecker = true;
Vehicle SpawnedVehicle[100];
int NumberSpawned = 0;

//Make Sure To Add This Also To Your Spawner
Blip VehicleBlip[100];
//

//Looping
if (BlipChecker)
{
for (int i = 0; i < NumberSpawned; i++)
{
if (ENTITY::DOES_ENTITY_EXIST(SpawnedVehicle[i]))
{
if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), SpawnedVehicle[i], 0))
{
UI::SET_BLIP_ALPHA(VehicleBlip[i], 0);
}
else if (!PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), SpawnedVehicle[i], 0))
{
UI::SET_BLIP_ALPHA(VehicleBlip[i], 255);
}
}
}
}


Serozoid - FREE & FOREVER !
Reply
#5
Interesting share nice
Reply

Users browsing: 1 Guest(s)