Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
JoshDa1

Can someone help me how to recompile this script?

Recommended Posts

JoshDa1

Hi guys, i need help to compile this script to be an .asi file using visual++. Can some tell me how to do this because everytime i recompile this an error show up it shows, "No such a file or directories" at #include "script.h". Is there something wrong code? Thank you for a massive million for any help.

 

THE SCRIPT

 

#include "script.h"

#pragma warning(disable : 4244 4305) // double <-> float conversions

Ped playerPed;
float x, y, z, sx, sy, sz;
Any blip[20];
Vector3 spawnPt, spawnPt1, spawnPt2, position;
Vector3 vehPos;
DWORD combatMdl, driverMdl;
DWORD crusaderHash, tankHash, lazerHash, insurgentHash, barracksHash, annihilatorHash, insurgentGHash, buzzardHash;
// 14 slots, if it's too much, so what ?
Any mainVehicle[20];
Any crua[20], crub[20], cruc[20], crud[20];
bool wasWanted = false;
bool firstStart = true;
bool ready[20];
int delFlag = 0;
float dist;
bool debugV = true;


bool isInAir = false;
//void set_spawn_points(Ped playerPed)
//{
// spawnPt1.x = position.x + 200.0f;
// spawnPt1.y = position.y;
// spawnPt1.z = position.z + 4.0f;
// spawnPt2.x = position.x;
// spawnPt2.y = position.y + 150.0f;
// spawnPt1.z = position.z + 4.0f;
// x = position.x;
// y = position.y;
// z = position.z;
//}

void debug_func()
{
if (debugV) {
debugV = false;
DWORD vehHash = buzzardHash;
STREAMING::REQUEST_MODEL(GAMEPLAY::GET_HASH_KEY("WEAPON_CARBINERIFLE")); STREAMING::REQUEST_MODEL(driverMdl); STREAMING::REQUEST_MODEL(combatMdl); STREAMING::REQUEST_MODEL(vehHash); STREAMING::REQUEST_MODEL(GAMEPLAY::GET_HASH_KEY("WEAPON_COMBATMG"));
// WAITING FOR LOADING //
while (!STREAMING::HAS_MODEL_LOADED(driverMdl) && !STREAMING::HAS_MODEL_LOADED(combatMdl) && !STREAMING::HAS_MODEL_LOADED(vehHash) && !STREAMING::HAS_MODEL_LOADED(GAMEPLAY::GET_HASH_KEY("WEAPON_COMBATMG")) && !STREAMING::HAS_MODEL_LOADED((GAMEPLAY::GET_HASH_KEY("WEAPON_CARBINERIFLE"))))
WAIT(100);
mainVehicle[19] = VEHICLE::CREATE_VEHICLE(vehHash, position.x + 5.0f, position.y, position.z, ENTITY::GET_ENTITY_HEADING(playerPed), 0, true); WAIT(100);
crua[19] = PED::CREATE_PED_INSIDE_VEHICLE(mainVehicle[19], 3, combatMdl, -1, false, false);
WEAPON::SET_CURRENT_PED_WEAPON(crua[19], GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLAYER_BUZZARD"), true);
WEAPON::SET_PED_INFINITE_AMMO(crua[19], true, GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLAYER_BUZZARD"));
PED::SET_PED_SHOOT_RATE(crua[19], 1000);
AI::TASK_VEHICLE_SHOOT_AT_PED(crua[19], playerPed, 100.0f);
}
}

void spawnIns(int type, int spawnId)
{
bool gIns = false;
DWORD vehHash;
DWORD weapHash;
weapHash = GAMEPLAY::GET_HASH_KEY("WEAPON_CARBINERIFLE");
ready[spawnId] = false;
// DYNAMIC SPAWN PTS
spawnPt = spawnPt2;
if (rand() % 11 > 5) spawnPt = spawnPt1;
spawnPt.z += 15.0f;
if (type == 5 || type == 7) spawnPt.z += 250.0f;
// CRUSADER
if (type == 1) vehHash = crusaderHash;
if (type == 2) { vehHash = insurgentHash; if (rand() % 2 == 1) { vehHash = insurgentGHash; gIns = true; } }
if (type == 3) vehHash = barracksHash;
// TANK
if (type == 4) vehHash = tankHash;
// AIR VEHICLES
// ANIHILATOR
if (type == 5) vehHash = annihilatorHash;
if (type == 5) weapHash = GAMEPLAY::GET_HASH_KEY("WEAPON_COMBATMG");
// LAZERS
if (type == 6) vehHash = lazerHash;
if (type == 7) vehHash = buzzardHash;

////////// STREAMING AND SPAWNING //////////
// STREAMING REQUESTS //
STREAMING::REQUEST_MODEL(GAMEPLAY::GET_HASH_KEY("WEAPON_CARBINERIFLE")); STREAMING::REQUEST_MODEL(driverMdl); STREAMING::REQUEST_MODEL(combatMdl); STREAMING::REQUEST_MODEL(vehHash); STREAMING::REQUEST_MODEL(GAMEPLAY::GET_HASH_KEY("WEAPON_COMBATMG"));
// WAITING FOR LOADING //
while (!STREAMING::HAS_MODEL_LOADED(driverMdl) && !STREAMING::HAS_MODEL_LOADED(combatMdl) && !STREAMING::HAS_MODEL_LOADED(vehHash) && !STREAMING::HAS_MODEL_LOADED(GAMEPLAY::GET_HASH_KEY("WEAPON_COMBATMG")) && !STREAMING::HAS_MODEL_LOADED((GAMEPLAY::GET_HASH_KEY("WEAPON_CARBINERIFLE"))))
WAIT(100);

// SPAWNING VEHICLE FIRST //
mainVehicle[spawnId] = VEHICLE::CREATE_VEHICLE(vehHash, spawnPt.x, spawnPt.y, spawnPt.z - 15.0f, ENTITY::GET_ENTITY_HEADING(playerPed) , 0, true); WAIT(100);
// WAITING 100ms
// SETTING ON GROUND AND CREATING PEDS [ONLY FOR GROUND VEHICLES!!]
if (type < 5) VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(mainVehicle[spawnId]);
if (type < 5) WAIT(2000);
WAIT(100);
// ALWAYS SPAWNING PILOT
crua[spawnId] = PED::CREATE_PED_INSIDE_VEHICLE(mainVehicle[spawnId], 3, driverMdl, -1, false, false);
// ONLY SPAWNING SECOND PERSONNEL IF NOT AIR VEHICLE AND NOT TANK
if (type < 4) { if (gIns){ crub[spawnId] = PED::CREATE_PED_INSIDE_VEHICLE(mainVehicle[spawnId], 3, combatMdl, 7, false, false); } else { crub[spawnId] = PED::CREATE_PED_INSIDE_VEHICLE(mainVehicle[spawnId], 3, combatMdl, 0, false, false); } }
// ONLY SPAWNING IF IS ANNI CREW OR GROUND VEHICLES
if (type == 5 || type < 4) cruc[spawnId] = PED::CREATE_PED_INSIDE_VEHICLE(mainVehicle[spawnId], 3, combatMdl, 1, false, false);
if (type == 5 || type < 4) crud[spawnId] = PED::CREATE_PED_INSIDE_VEHICLE(mainVehicle[spawnId], 3, combatMdl, 2, false, false);

////////// TASKS ON SPAWN //////////
if (type < 5) AI::TASK_VEHICLE_DRIVE_TO_COORD(crua[spawnId], mainVehicle[spawnId], position.x, position.y, position.z, 70.0f, 1, ENTITY::GET_ENTITY_MODEL(mainVehicle[spawnId]), 1, 0xC00AB, -1);
if (type == 6){ VEHICLE::SET_VEHICLE_FORWARD_SPEED(mainVehicle[spawnId], 80.0f); }
else { VEHICLE::SET_VEHICLE_FORWARD_SPEED(mainVehicle[spawnId], 10.0f); }
if (type == 5 || type == 7) VEHICLE::SET_HELI_BLADES_FULL_SPEED(mainVehicle[spawnId]);
// ADDING ARMOUR TO 3 CREW MEMBERS, PILOT NEVER HAS ARMOR.
if (type < 4) PED::ADD_ARMOUR_TO_PED(crub[spawnId], 100);
if (type == 5 || type < 4) PED::ADD_ARMOUR_TO_PED(cruc[spawnId], 100);
if (type == 5 || type < 4) PED::ADD_ARMOUR_TO_PED(crud[spawnId], 100);
// WEAPON DELAYED
WEAPON::GIVE_DELAYED_WEAPON_TO_PED(crua[spawnId], weapHash, 100, false);
if (type < 4) WEAPON::GIVE_DELAYED_WEAPON_TO_PED(crub[spawnId], weapHash, 100, false);
if (type == 5 || type < 4) WEAPON::GIVE_DELAYED_WEAPON_TO_PED(cruc[spawnId], weapHash, 100, false);
if (type == 5 || type < 4) WEAPON::GIVE_DELAYED_WEAPON_TO_PED(crud[spawnId], weapHash, 100, false);
if (type == 5) WAIT(2000);
if (gIns) {
WEAPON::SET_CURRENT_PED_WEAPON(crub[spawnId], GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_TURRET_INSURGENT"), true);
WEAPON::SET_PED_INFINITE_AMMO(crub[spawnId], true, GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_TURRET_INSURGENT"));
PED::SET_PED_SHOOT_RATE(crub[spawnId], 1000);
}
if (type == 6) {
VEHICLE::SET_VEHICLE_STEER_BIAS(mainVehicle[spawnId], 250.0f);
VEHICLE::SET_VEHICLE_FORWARD_SPEED(mainVehicle[spawnId], 200.0f);
ENTITY::SET_ENTITY_MAX_SPEED(mainVehicle[spawnId], 200.0f);
AI::TASK_LOOK_AT_ENTITY(crua[spawnId], playerPed, -1, 2048, 3);
AI::TASK_PLANE_CHASE(crua[spawnId], playerPed, 150.0f, 150.0f, 250.0f);
WAIT(1000);
}
if (type == 7) {
WEAPON::SET_CURRENT_PED_WEAPON(crua[spawnId], GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLAYER_BUZZARD"), true);
WEAPON::SET_PED_INFINITE_AMMO(crua[spawnId], true, GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLAYER_BUZZARD"));
PED::SET_PED_SHOOT_RATE(crua[spawnId], 2000);
AI::TASK_VEHICLE_SHOOT_AT_PED(crua[spawnId], playerPed, 100.0f);
AI::TASK_VEHICLE_CHASE(crua[spawnId], playerPed);
}
if (spawnId > 8) {
blip[spawnId] = UI::GET_BLIP_FROM_ENTITY(mainVehicle[spawnId]);
UI::REMOVE_BLIP(&blip[spawnId]);
blip[spawnId] = UI::ADD_BLIP_FOR_ENTITY(mainVehicle[spawnId]);
UI::SET_BLIP_SPRITE(blip[spawnId], 16);
UI::SET_BLIP_AS_MISSION_CREATOR_BLIP(blip[spawnId], false);
UI::SET_BLIP_FADE(blip[spawnId], false, false);
}
if (spawnId < 7) {
blip[spawnId] = UI::ADD_BLIP_FOR_ENTITY(mainVehicle[spawnId]);
UI::SET_BLIP_SPRITE(blip[spawnId], 8);
UI::SET_BLIP_FLASHES(blip[spawnId], true);
}
UI::SET_BLIP_AS_SHORT_RANGE(blip[spawnId], false);
UI::SET_BLIP_COLOUR(blip[spawnId], 1);
// BLIP ID 16 IS JET FIGHTER

}

void set_spawn_points()
{
//// setting offset
//y = 300.0f;
//x = 300.0f;

//// setting up spawn pts
//spawnPt1 = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, y, 0.0);
//spawnPt2 = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, x, 0.0, 0.0);
if (isInAir == false) {
float step = 0.0f;
if (rand() % 2 == 1){ step = -180.0f; }
else { step = 180.0f; }
spawnPt1 = position;
spawnPt1.x = position.x + step;
if (rand() % 2 == 1){ step = -180.0f; }
else { step = 180.0f; }
spawnPt2 = position;
spawnPt2.y = position.y + step;


if (rand() % 2 == 1){ step = -2.0f; }
else { step = 2.0f; }

// set spawn points with a radius of 500
int maxStep = 50;
// finding spawnpt1 loop.
while (!PATHFIND::IS_POINT_ON_ROAD(spawnPt1.x, spawnPt1.y, spawnPt1.z, 0) && maxStep > 0)
{
spawnPt1.x += step;
maxStep--;
}
// resetting max step to 75
maxStep = 50;
if (rand() % 2 == 1){ step = -2.0f; }
else { step = 2.0f; }
// finding spawnpt2 loop.
while (!PATHFIND::IS_POINT_ON_ROAD(spawnPt2.x, spawnPt2.y, spawnPt2.z, 0) && maxStep > 0)
{
spawnPt2.y -= step;
maxStep--;
}
GAMEPLAY::GET_GROUND_Z_FOR_3D_COORD(spawnPt2.x, spawnPt2.y, spawnPt2.z + 100.0f, &spawnPt2.z);
GAMEPLAY::GET_GROUND_Z_FOR_3D_COORD(spawnPt1.x, spawnPt1.y, spawnPt1.z + 100.0f, &spawnPt1.z);
}
else {
float step = 0.0f;
if (rand() % 2 == 1){ step = -150.0f; }
else { step = 150.0f; }
spawnPt1 = position;
spawnPt2 = position;
spawnPt1.x = position.x + step;
if (rand() % 2 == 1){ step = -150.0f; }
else { step = 150.0f; }
spawnPt2.y = position.y + step;
spawnPt1.z = position.z + 150.0f;
spawnPt2.z = position.z + 150.0f;
}

}


void update()
{
if (firstStart){
// setting up models
driverMdl = GAMEPLAY::GET_HASH_KEY("S_M_Y_Marine_01");
combatMdl = GAMEPLAY::GET_HASH_KEY("S_M_Y_Marine_03");

// setting up vehicles
buzzardHash = GAMEPLAY::GET_HASH_KEY("buzzard");
crusaderHash = GAMEPLAY::GET_HASH_KEY("crusader");
tankHash = GAMEPLAY::GET_HASH_KEY("rhino");
annihilatorHash = GAMEPLAY::GET_HASH_KEY("annihilator");
insurgentHash = GAMEPLAY::GET_HASH_KEY("insurgent2");
insurgentGHash = GAMEPLAY::GET_HASH_KEY("insurgent");
lazerHash = GAMEPLAY::GET_HASH_KEY("lazer");
barracksHash = GAMEPLAY::GET_HASH_KEY("barracks");
firstStart = false;
for (int i = 0; i <= 19; i++){ ready = true; }
}

// SPAWN ID SYSTEM ///////
// LAND VEHICLES :: 0-5 //
// TANK :: 6 //
// ANNIHILATORS :: 7-8 //
// JETS :: 9-16//
//////////////////////////
Player player = PLAYER::PLAYER_ID();
playerPed = PLAYER::PLAYER_PED_ID();
Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed);
position = ENTITY::GET_ENTITY_COORDS(playerPed, 1);
WAIT(1000);
isInAir = false;
if (PED::IS_PED_IN_FLYING_VEHICLE(playerPed)) isInAir = true;


if (PLAYER::GET_PLAYER_WANTED_LEVEL(player) > 4)
{

dist = 210.0f;
if (PED::IS_PED_IN_ANY_VEHICLE(playerPed, false)) dist = 180.0f;
set_spawn_points();
//CLEANING UP
for (int i = 0; i <= 19; i++)
{
delFlag = 0;
vehPos = ENTITY::GET_ENTITY_COORDS(mainVehicle, false);
if (isInAir && !ENTITY::DOES_ENTITY_EXIST(mainVehicle)) ready = true;
if (ENTITY::IS_ENTITY_DEAD(mainVehicle)) { ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&mainVehicle); ready = true; }
if (ENTITY::IS_ENTITY_DEAD(crua)){ ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crua); UI::REMOVE_BLIP(&blip); delFlag++; }
if (ENTITY::IS_ENTITY_DEAD(crub)){ ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crub); UI::REMOVE_BLIP(&blip); delFlag++; }
if (ENTITY::IS_ENTITY_DEAD(cruc)){ ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&cruc); UI::REMOVE_BLIP(&blip); delFlag++; }
if (ENTITY::IS_ENTITY_DEAD(crud)){ ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crud); UI::REMOVE_BLIP(&blip); delFlag++; }
// DELFLAG IS USED TO CHECK IF ALL THE CREW IS DEAD. IF IT'S THE CASE, THEN WE DELETE THE VEHICLE
// DELFLAG ONLY WORKS ON GROUND VEHICLES.
if (delFlag == 4){ ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&mainVehicle); ready = true; }
if (i < 7 || (i > 8 && i < 16)){
if (i > 8 && i < 16) dist = 900.0f;
if (!ENTITY::IS_ENTITY_AT_COORD(mainVehicle, position.x, position.y, position.z, dist, dist, dist * 1.5f, 0, 1, 0)){
ENTITY::DELETE_ENTITY(&mainVehicle);
ENTITY::DELETE_ENTITY(&crua);
ENTITY::DELETE_ENTITY(&crub);
ENTITY::DELETE_ENTITY(&cruc);
ENTITY::DELETE_ENTITY(&crud);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&mainVehicle);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crua);
ready = true;
UI::REMOVE_BLIP(&blip);
}
}

}


// SPAWN INDEX SYSTEM ////
// LAND VEHICLES :: 0-5 //
// TANK :: 6 //
// ANNIHILATORS :: 7-8 //
// JETS :: 9-15//
// BUZZARD :: 16 //
//////////////////////////

// SPAWN IDs
// CRUSADER :: 1
// INSURGENT :: 2
// BARRACKS :: 3
// TANK :: 4
// ANNIHILATOR :: 5
// LAZER :: 6
// BUZZARD :: 7

// SPAWN SYSTEM V3.0
// SPAWNS 12 GROUND VEHICLES REGARDLESS. (6 CRUSADERS, 5 INSURGENTS, 2 BARRACKS)
// SPAWN NEW WAVE IF :
// - VEHICLES AND CREW ARE DEAD OR DO NOT EXIST
// - PLAYERS HAS LEFT THEM BEHIND
// DYNAMIC SPAWN FOR OTHER ENTITIES.
// TANK : 1 chance out of 200 per update
// ANNIHILATOR : 2 max
// LAZERS : only when in air and high in the sky
wasWanted = true;

for (int i = 0; i <= 19; i++)
{
position = ENTITY::GET_ENTITY_COORDS(playerPed, 1);
set_spawn_points();
switch (i){
case 0:
if (ready && !isInAir) { spawnIns(1, i); }
break;
case 1:
if (ready && !isInAir) { spawnIns(1, i); }
break;
case 2:
if (ready && !isInAir) { spawnIns(1, i); }
break;
case 3:
if (ready && !isInAir) { spawnIns(2, i); }
break;
case 4:
if (ready && !isInAir) { spawnIns(2, i); }
break;
case 5:
if (ready && !isInAir) { spawnIns(3, i); }
break;
case 6:
if (ready && rand() % 101 == 0 && !isInAir) { spawnIns(4, i); }
break;
case 7:
if (ready && !isInAir) { spawnIns(5, i); }
break;
case 8:
if (ready && !isInAir) { spawnIns(5, i); }
break;
case 9:
if (ready && isInAir) { spawnIns(6, i); }
break;
case 10:
if (ready && isInAir) { spawnIns(6, i); }
break;
case 11:
if (ready && isInAir) { spawnIns(6, i); }
break;
case 12:
if (ready && isInAir) { spawnIns(6, i); }
break;
case 13:
if (ready && isInAir) { spawnIns(6, i); }
break;
case 14:
if (ready && isInAir) { spawnIns(6, i); }
break;
case 15:
if (ready && isInAir) { spawnIns(6, i); }
break;
case 16:
if (ready && !isInAir) { spawnIns(7, i); }
break;
}

}

if (!ENTITY::IS_ENTITY_DEAD(mainVehicle[16])) {
WEAPON::SET_CURRENT_PED_WEAPON(crua[16], GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLAYER_BUZZARD"), true);
WEAPON::SET_PED_INFINITE_AMMO(crua[16], true, GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLAYER_BUZZARD"));
PED::SET_PED_SHOOT_RATE(crua[16], 2000);
if (ENTITY::IS_ENTITY_A_VEHICLE(playerPed) && rand() % 11 == 5 ) {
WEAPON::SET_CURRENT_PED_WEAPON(crua[16], GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLANE_ROCKET"), true);
WEAPON::SET_PED_INFINITE_AMMO(crua[16], true, GAMEPLAY::GET_HASH_KEY("VEHICLE_WEAPON_PLANE_ROCKET"));
PED::SET_PED_SHOOT_RATE(crua[16], 1);
}

AI::TASK_VEHICLE_SHOOT_AT_PED(crua[16], playerPed, 100.0f);
}

if (isInAir)
{
for (int i = 9; i <= 15; i++) {
if (mainVehicle, position.x, position.y, position.z, 250.0f, 250.0f, 250.0f, 0, 1, 0) { ENTITY::DELETE_ENTITY(&mainVehicle); ENTITY::DELETE_ENTITY(&crua); }
//AI::TASK_VEHICLE_CHASE(crua, playerPed);
//VEHICLE::SET_VEHICLE_FORWARD_SPEED(mainVehicle, 80.0f);
}
}

GAMEPLAY::SET_DISPATCH_TIME_BETWEEN_SPAWN_ATTEMPTS_MULTIPLIER(playerPed, 4.0f);
}
else {
if (wasWanted){
GAMEPLAY::SET_DISPATCH_TIME_BETWEEN_SPAWN_ATTEMPTS_MULTIPLIER(playerPed, 1.0f);
wasWanted = false;
for (int i = 0; i <= 19; i++)
{
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&mainVehicle);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crua);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crub);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&cruc);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crud);
AI::CLEAR_PED_TASKS_IMMEDIATELY(crua);
AI::CLEAR_PED_TASKS_IMMEDIATELY(crub);
AI::CLEAR_PED_TASKS_IMMEDIATELY(cruc);
AI::CLEAR_PED_TASKS_IMMEDIATELY(crud);
UI::REMOVE_BLIP(&blip);
}
for (int i = 9; i <= 15; i++) {
ENTITY::DELETE_ENTITY(&mainVehicle);
ENTITY::DELETE_ENTITY(&crua);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&crua);
ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&mainVehicle);
}
}
// USE THIS TO TRY FUNKY STUFF
//debug_func();
}
}




void main()
{
while (true)
{
update();
}
}

void ScriptMain()
{
srand(GetTickCount());
main();
}

 

Edited by JoshDa1

Share this post


Link to post
Share on other sites
Neutrinobeam

Those empty includes are either doing nothing or causing the error. Take them out.

 

Does "script.h" exist and does the compiler know where it is?

Share this post


Link to post
Share on other sites
JoshDa1

Those empty includes are either doing nothing or causing the error. Take them out.

 

Does "script.h" exist and does the compiler know where it is?

This is only one file script and the compiler doesn't know where it is.

Share this post


Link to post
Share on other sites
JoshDa1

If anyone can recompile this and tell me when it done i would very appreciated guys, i'm allowing you to use this script because i need it to work. You can also publish it and give a credit. Thank you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.