Liberty City Airline[Script]

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

SwizzyPlays

Active Poster
CC Dev Team
Active Member
Sep 16, 2015
350
269
123
LIBERTY CITY AIRLINES
Teleport script I made in like 30 minutes or so. When turned on creates 3 blips where the teleports are. Press LB or RB to choose that destination. Anyway when I was making this I had something entirely different in my head but it came out as this lmao none the less its still neat.

DOWNLOAD
VIDEO

VIRUS SCAN
SOURCE:
/**
Liberty City Airlines Script
Created by: SwizzyPlays
**/
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>

void callair(void)
{
if (GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT("lc_airlines") == 0)
{
REQUEST_SCRIPT("lc_airlines");
while (!HAS_SCRIPT_LOADED("lc_airlines"))
WAIT(0);

START_NEW_SCRIPT("lc_airlines", 1024);
MARK_SCRIPT_AS_NO_LONGER_NEEDED("lc_airlines");
}
}
void terminate(void){
TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME("lc_airlines");
WAIT(70);
SET_PLAYER_CONTROL(GetPlayerIndex(), true);
print("~b~Thanks for choosing ~r~Liberty City Airlines~y~!");
TERMINATE_THIS_SCRIPT();
}
void main(void){
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
print("~b~Liberty City Airlines By: ~y~SwizzyPlays");
WAIT(1000);
print("~b~Press (~PAD_A~+~PAD_X~) TO EXIT LC AIRLINES");
while(true){
WAIT(0);
callair();
if (IS_BUTTON_JUST_PRESSED(0, BUTTON_A) && IS_BUTTON_JUST_PRESSED(0, BUTTON_X)){
terminate();
}
}
}
/**
Liberty City Airlines Script
Created by: SwizzyPlays
**/
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
//vars
Blip mapblip;

void Print(char *string) // Print
{
CLEAR_PRINTS();
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string, 5000, 1);
}
void blip_location(void)
{
//blip 1
ADD_BLIP_FOR_COORD(2524.8894, 480.0461, 12.6500, &mapblip);
CHANGE_BLIP_ALPHA(mapblip, 255);
CHANGE_BLIP_SPRITE(mapblip, 82);
CHANGE_BLIP_NAME_FROM_ASCII(mapblip, "Main Airport");
CHANGE_BLIP_COLOUR(mapblip, 2);
//blip 2
ADD_BLIP_FOR_COORD(304.7143, -693.6884, 4.6844, &mapblip);
CHANGE_BLIP_ALPHA(mapblip, 255);
CHANGE_BLIP_SPRITE(mapblip, 82);
CHANGE_BLIP_NAME_FROM_ASCII(mapblip, "Main Heliport");
CHANGE_BLIP_COLOUR(mapblip, 2);
//blip 3
ADD_BLIP_FOR_COORD(-1203.2198, 1690.3046, 34.5613, &mapblip);
CHANGE_BLIP_ALPHA(mapblip, 255);
CHANGE_BLIP_SPRITE(mapblip, 82);
CHANGE_BLIP_NAME_FROM_ASCII(mapblip, "Secondary Heliport");
CHANGE_BLIP_COLOUR(mapblip, 2);
/**
///!NOT NEEDED JSUT PUTS A ARROW ABOVE THE CORDS, LOOP THIS SOMEWHERE IF YOU WANNA USE IT :)
DRAW_COLOURED_CYLINDER(2524.8894, 480.0461, 12.6500, 1.80000000, 1.20000000, 0, 132, 202, 255); //air
DRAW_COLOURED_CYLINDER(304.7143, -693.6884, 4.6844, 1.80000000, 1.20000000, 0, 132, 202, 255); //heli
DRAW_COLOURED_CYLINDER(-1203.2198, 1690.3046, 34.5613, 1.80000000, 1.20000000, 0, 132, 202, 255); //heli2
**/
}
void tele_heli(void){
while (IS_SCREEN_FADING()){
WAIT(0);
}
DO_SCREEN_FADE_OUT(500);
while (IS_SCREEN_FADING()){
WAIT(0);
}
float x = 304.7143, y = -693.6884, z = 4.6844;
SET_PLAYER_CONTROL(GetPlayerIndex(), false);
LOAD_SCENE(x, y, z);
WAIT(500);
SET_PLAYER_CONTROL(GetPlayerIndex(), true);
SET_CHAR_COORDINATES_NO_OFFSET(GetPlayerPed(), x, y, z);
while (IS_SCREEN_FADING()){
WAIT(0);
}
DO_SCREEN_FADE_IN(500);
while (IS_SCREEN_FADING()){
WAIT(0);
}
WAIT(5);
TERMINATE_THIS_SCRIPT();
}
void tele_heli2(void){
while (IS_SCREEN_FADING()){
WAIT(0);
}
DO_SCREEN_FADE_OUT(500);
while (IS_SCREEN_FADING()){
WAIT(0);
}
float x = -1203.2198, y = 1690.3046, z = 34.5613;
SET_PLAYER_CONTROL(GetPlayerIndex(), false);
LOAD_SCENE(x, y, z);
WAIT(500);
SET_PLAYER_CONTROL(GetPlayerIndex(), true);
SET_CHAR_COORDINATES_NO_OFFSET(GetPlayerPed(), x, y, z);
while (IS_SCREEN_FADING()){
WAIT(0);
}
DO_SCREEN_FADE_IN(500);
while (IS_SCREEN_FADING()){
WAIT(0);
}
WAIT(5);
TERMINATE_THIS_SCRIPT();
}
void tele_air(void){
while (IS_SCREEN_FADING()){
WAIT(0);
}
DO_SCREEN_FADE_OUT(500);
while (IS_SCREEN_FADING()){
WAIT(0);
}
float x = 2524.8894, y = 480.0461, z = 12.6500;
SET_PLAYER_CONTROL(GetPlayerIndex(), false);
LOAD_SCENE(x, y, z);
WAIT(500);
SET_PLAYER_CONTROL(GetPlayerIndex(), true);
SET_CHAR_COORDINATES_NO_OFFSET(GetPlayerPed(), x, y, z);
while (IS_SCREEN_FADING()){
WAIT(0);
}
DO_SCREEN_FADE_IN(500);
while (IS_SCREEN_FADING()){
WAIT(0);
}
WAIT(5);
TERMINATE_THIS_SCRIPT();
}
void heli_set(void){
if (LOCATE_CHAR_ANY_MEANS_3D(GetPlayerPed(), 304.7143, -693.6884, 4.6844, 0.80000000, 0.80000000, 2.00000000, 0 )){
if (IS_CHAR_ON_FOOT(GetPlayerPed())){
float BGx,BGy,BGz;
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), 0, 0, 0, &BGx, &BGy, &BGz);
SET_CHAR_HEADING(GetPlayerPed(), 90.7625);
SET_PLAYER_CONTROL(GetPlayerIndex(), false);
WAIT(100);
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "~COL_NET_4~PRESS (~PAD_LB~) FOR AIRPORT OR (~PAD_RB~) FOR SECONDARY HELIPORT", 9000, 1);
while(true){
if (IS_BUTTON_PRESSED(0, BUTTON_LB)){
tele_air();
}
if(IS_BUTTON_PRESSED(0, BUTTON_RB)){
tele_heli2();
}
}
}
}
}
void heli2_set(void){
if (LOCATE_CHAR_ANY_MEANS_3D(GetPlayerPed(), -1203.2198, 1690.3046, 34.5613, 0.80000000, 0.80000000, 2.00000000, 0 )){
if (IS_CHAR_ON_FOOT(GetPlayerPed())){
float BGx,BGy,BGz;
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), 0, 0, 0, &BGx, &BGy, &BGz);
SET_CHAR_HEADING(GetPlayerPed(), 90.7625);
SET_PLAYER_CONTROL(GetPlayerIndex(), false);
WAIT(100);
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "~COL_NET_4~PRESS (~PAD_LB~) FOR HELIPORT OR (~PAD_RB~) FOR AIRPORT", 9000, 1);
while(true){
if (IS_BUTTON_PRESSED(0, BUTTON_LB)){
tele_heli();
}
if(IS_BUTTON_PRESSED(0, BUTTON_RB)){
tele_air();
}
}
}
}
}
void air_set(void){ //COULD DO THIS BETTER TBH JUST A EASY WAY OF CHECKING IF THE PLAYER IS IN THE COORDS
if (LOCATE_CHAR_ANY_MEANS_3D(GetPlayerPed(), 2524.8894, 480.0461, 12.6500, 0.80000000, 0.80000000, 2.00000000, 0 )){
if (IS_CHAR_ON_FOOT(GetPlayerPed())){
float BGx,BGy,BGz;
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), 0, 0, 0, &BGx, &BGy, &BGz);
SET_CHAR_HEADING(GetPlayerPed(), 90.7625);
SET_PLAYER_CONTROL(GetPlayerIndex(), false);
WAIT(100);
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "~COL_NET_4~PRESS (~PAD_LB~) FOR HELIPORT OR (~PAD_RB~) FOR SECONDARY HELIPORT", 9000, 1);
while(true){
if (IS_BUTTON_PRESSED(0, BUTTON_LB)){
tele_heli();
}
if(IS_BUTTON_PRESSED(0, BUTTON_RB)){
tele_heli2();
}
}
}
}
}

void spawn(void){
air_set();
heli_set();
heli2_set();
}

void main(void){
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
blip_location();
while(true){
WAIT(0);
//for single player cause cops at airport XD
if(!IS_NETWORK_SESSION()){
CLEAR_WANTED_LEVEL(GetPlayerIndex());
SET_WANTED_MULTIPLIER(0.0);
}
WAIT(10);
spawn();
WAIT(60);
//text_loc();
}
}
 
Last edited:
  • Like
Reactions: Emaƞuεl
General chit-chat
Help Users
    Chat Bot: jimbo74 is our newest member. Welcome!