Post: ►►Flyable Car Mod◄◄__Fun with HEX-F
09-07-2010, 04:25 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
HEX-F Coding Fun
[ame=https://www.youtube.com/watch?v=d5_G0vz0dLo]YouTube - Drivable Models![/ame]



This version is for use with terminal, you must change the coordinates for every map


    carSpawner() 
{
self setOrigin((300,300,40.5)); //sets the coordinates for you to spawn
racecar = spawn( "script_model", (0,0,40.5) ); //sets the coordinates for the model to spawn
racecar.angles = (0,10,0); //sets the models angles
racecar.targetname = "destructible_vehicle"; //sets the type
racecar.destructible_type = "vehicle_policecar"; //sets the destructable type if it is destructable
racecar setModel( "vehicle_policecar_lapd_destructible" ); //sets the model
racecar common_scripts\_destructible::setup_destructibles();
racecar.inUse = 0; //necessary var
for(;Winky Winky
{
if(distance(self.origin, racecar.origin) <100 && racecar.inUse == 0)
{
self iPrintlnBold("Press X to use"); //Text
}


if(distance(self.origin, racecar.origin) <100 && self usebuttonpressed() && racecar.inuse == 0)
{
self iPrintlnBold("You are now driving");
racecar.inUse = 1;
self playerlinkto(racecar); //links you to the model
self setPlayerAngles(racecar.angles+(0,0,0)); //sets your angles to the models
self takeAllWeapons(); //deletes weapons
wait 1.0;
}

if(racecar.inUse == 1 && self usebuttonpressed())
{
racecar.inUse = 0;
self unlink(racecar); //unlinks you from the model
self giveWeapon( "deserteaglegold_mp", 0, false ); //gives you gold deagle
wait 1.0;
}

if(racecar.inUse == 1 && self attackbuttonpressed())
{
if(racecar.angles != self.angles+(0,0,0) && racecar.inUse == 1)
{
racecar.angles = self.angles+(0,0,0); //checks to make sure the models angles are equal to yours
}
racecar moveto(racecar.origin+anglestoforward(self getplayerangles())*200, 0.05); //Necessary move function
wait 0.001;
}
wait 0.01;
}
}


Script by -kiwimoosical





Press the THANKS button if you found this Useful.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to NextGenTactics for this useful post:

DanGFX, Karoolus, Mezzid, Perfekt, Pyrochemical
09-07-2010, 04:27 AM #2
juddylovespizza
I'VE GOT JUNGLE FEVER
These mods keep getting better and better!

The following user thanked juddylovespizza for this useful post:

boombrshot
09-07-2010, 04:38 AM #3
Console
Keepin it real
lol flyable chopper now drivable car :mudkip:
09-07-2010, 04:50 AM #4
coltsfan360
Climbing up the ladder
Awesome! I want to fly a car -.-
09-07-2010, 05:04 AM #5
This is freakin awesome dude.
09-07-2010, 05:10 AM #6
Unfortunately the state the script is in now does not work on PC :( so I will get to work on converting it.

Okay I just converted it to PC. Lets just say it just works. The vehicle can't be destroyed because the following script doesn't exist on PC:
    racecar common_scripts_destructible::setup_destructibles();
Other than the windshield this is pretty nice.
    
carSpawner()
{
self setOrigin((300,300,40.5)); //sets the coordinates for you to spawn
racecar = spawn( "script_model", (0,0,40.5) ); //sets the coordinates for the model to spawn
racecar.angles = (0,10,0); //sets the models angles
racecar.targetname = "destructible_vehicle"; //sets the type
racecar.destructible_type = "vehicle_policecar"; //sets the destructable type if it is destructable
racecar setModel( "vehicle_policecar_lapd_destructible" ); //sets the model
racecar.inUse = 0; //necessary var
for(;Winky Winky
{
if(distance(self.origin, racecar.origin) <100 && racecar.inUse == 0)
{
self iPrintlnBold("Press F to use"); //Text
}


if(distance(self.origin, racecar.origin) <100 && self usebuttonpressed() && racecar.inuse == 0)
{
self iPrintlnBold("You are now driving");
racecar.inUse = 1;
self playerlinkto(racecar); //links you to the model
self setPlayerAngles(racecar.angles+(0,0,0)); //sets your angles to the models
self takeAllWeapons(); //deletes weapons
wait 1.0;
}

if(racecar.inUse == 1 && self usebuttonpressed())
{
racecar.inUse = 0;
self unlink(racecar); //unlinks you from the model
self giveWeapon( "deserteaglegold_mp", 0, false ); //gives you gold deagle
wait 1.0;
}

if(racecar.inUse == 1 && self attackbuttonpressed())
{
if(racecar.angles != self.angles+(0,0,0) && racecar.inUse == 1)
{
racecar.angles = self.angles+(0,0,0); //checks to make sure the models angles are equal to yours
}
racecar moveto(racecar.origin+anglestoforward(self getplayerangles())*200, 0.05); //Necessary move function
wait 0.001;
}
wait 0.01;
}
}

The following user thanked Macdaddy4sure for this useful post:

Karoolus
09-07-2010, 11:23 AM #7
haha, pretty funny Claps
09-07-2010, 12:16 PM #8
jezza.boi
Maintainin' Ma'h Cool
lmao i want em to bring out a mod where itl mod the whole map to make it a city and itl be a futuristic place Happy
09-07-2010, 12:36 PM #9
Gay For Satan
DevouringHeavens
Originally posted by Macdaddy4sure View Post
Unfortunately the state the script is in now does not work on PC :( so I will get to work on converting it.

Okay I just converted it to PC. Lets just say it just works. The vehicle can't be destroyed because the following script doesn't exist on PC:
    racecar common_scripts_destructible::setup_destructibles();
Other than the windshield this is pretty nice.
    
carSpawner()
{
self setOrigin((300,300,40.5)); //sets the coordinates for you to spawn
racecar = spawn( "script_model", (0,0,40.5) ); //sets the coordinates for the model to spawn
racecar.angles = (0,10,0); //sets the models angles
racecar.targetname = "destructible_vehicle"; //sets the type
racecar.destructible_type = "vehicle_policecar"; //sets the destructable type if it is destructable
racecar setModel( "vehicle_policecar_lapd_destructible" ); //sets the model
racecar.inUse = 0; //necessary var
for(;Winky Winky
{
if(distance(self.origin, racecar.origin) <100 && racecar.inUse == 0)
{
self iPrintlnBold("Press F to use"); //Text
}


if(distance(self.origin, racecar.origin) <100 && self usebuttonpressed() && racecar.inuse == 0)
{
self iPrintlnBold("You are now driving");
racecar.inUse = 1;
self playerlinkto(racecar); //links you to the model
self setPlayerAngles(racecar.angles+(0,0,0)); //sets your angles to the models
self takeAllWeapons(); //deletes weapons
wait 1.0;
}

if(racecar.inUse == 1 && self usebuttonpressed())
{
racecar.inUse = 0;
self unlink(racecar); //unlinks you from the model
self giveWeapon( "deserteaglegold_mp", 0, false ); //gives you gold deagle
wait 1.0;
}

if(racecar.inUse == 1 && self attackbuttonpressed())
{
if(racecar.angles != self.angles+(0,0,0) && racecar.inUse == 1)
{
racecar.angles = self.angles+(0,0,0); //checks to make sure the models angles are equal to yours
}
racecar moveto(racecar.origin+anglestoforward(self getplayerangles())*200, 0.05); //Necessary move function
wait 0.001;
}
wait 0.01;
}
}


Send me converted pc code? where do you put it?
09-07-2010, 12:40 PM #10
Originally posted by jezza.boi View Post
lmao i want em to bring out a mod where itl mod the whole map to make it a city and itl be a futuristic place Happy

Right now that is not possible.

@Ryan
That is the PC script. If you don't know what to do then good luck.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo