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  
yoloman

Help with compile script

Recommended Posts

yoloman

I had this Source : #include <natives.h>

#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
Ped gang[15], dped, pped[3];
Blip Gbase, gps, members[15], bdp, bpp[3];
Vehicle ccar;
Pickup Hpack;
char *wname;
float xp, yp, zp, xb[4], yb[4], sx, sy, sz, grnd, dist;
int dm, cdm;
uint weapon[16], stat, mlvl, rl, turf, max, bc, model[5], modveh[2];
uint gwar = 0;
uint gset = 0;
uint gkill = 0;
bool dbgen = 0;
//############### Keyboard ################################//
#define VK_TAB 0x09
#define VK_CONTROL 0x11
//############### Keyboard ################################//
bool IsKeyPressed(uint iKey , uint iJey)
{
return IS_KEYBOARD_KEY_PRESSED(0,iKey) && IS_KEYBOARD_KEY_JUST_PRESSED(0,iJey);
}
void Print(char *string)
{
PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string, 2500, 1);
}
void InitSet(void)
{
weapon[0] = WEAPON_PISTOL;
weapon[1] = WEAPON_MICRO_UZI;
weapon[2] = WEAPON_MP5;
weapon[3] = WEAPON_RLAUNCHER;
weapon[4] = WEAPON_BASEBALLBAT;
weapon[5] = WEAPON_KNIFE;
weapon[6] = WEAPON_MOLOTOV;
weapon[7] = WEAPON_SHOTGUN;
weapon[8] = WEAPON_MICRO_UZI;
weapon[9] = WEAPON_AK47;
weapon[10] = WEAPON_SNIPERRIFLE;
weapon[11] = WEAPON_GRENADE;
weapon[12] = WEAPON_DEAGLE;
weapon[13] = WEAPON_BARETTA;
weapon[14] = WEAPON_M4;
weapon[15] = WEAPON_M40A1;
xb[3] = -203.4649, yb[3] = 261.7023;
stat = GET_INT_STAT(363);
SET_INT_STAT(363, 5);
GET_MAX_WANTED_LEVEL(&mlvl);
LOAD_CHAR_DECISION_MAKER(2, &dm);
LOAD_COMBAT_DECISION_MAKER(3, &cdm);
SET_DECISION_MAKER_ATTRIBUTE_SIGHT_RANGE(dm, 250);
SET_DECISION_MAKER_ATTRIBUTE_SIGHT_RANGE(cdm, 250);
}
void GetSafeCoords(void)
{
float offx, offy, x, y, z, sgrnd;
GENERATE_RANDOM_FLOAT_IN_RANGE(-80.0, 80.0, &offx);
GENERATE_RANDOM_FLOAT_IN_RANGE(-80.0, 80.0, &offy);
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), offx, offy, 0, &x, &y, &z);
GET_GROUND_Z_FOR_3D_COORD(x, y, z, &sgrnd);
GET_SAFE_POSITION_FOR_CHAR(x, y ,sgrnd, TRUE, &sx, &sy, &sz);
}
void Set(uint ptype, uint btype, uint rw)
{
uint cash, comp, var, wep;
SET_CHAR_DECISION_MAKER(ptype, dm);
SET_COMBAT_DECISION_MAKER(ptype, cdm);
SET_CHAR_AS_ENEMY(ptype, TRUE);
SET_CHAR_ACCURACY(ptype, 50);
SET_SENSE_RANGE(ptype, 500.0);
SET_CHAR_WILL_MOVE_WHEN_INJURED(ptype, TRUE);
SET_CHAR_WILL_USE_COVER(ptype, TRUE);
SET_PED_DONT_DO_EVASIVE_DIVES(ptype, TRUE);
SET_PED_DIES_WHEN_INJURED(ptype, TRUE);
SET_CHAR_WILL_DO_DRIVEBYS(ptype, TRUE);
SET_PED_GENERATES_DEAD_BODY_EVENTS(ptype, TRUE);
GENERATE_RANDOM_INT_IN_RANGE(10, 50, &cash);
SET_CHAR_MONEY(ptype, cash);
SET_CHAR_RANDOM_COMPONENT_VARIATION(ptype);
GENERATE_RANDOM_INT_IN_RANGE(0, 5, &comp);
GENERATE_RANDOM_INT_IN_RANGE(0, 5, &var);
SET_CHAR_PROP_INDEX_TEXTURE(ptype, 0, comp, var);
GENERATE_RANDOM_INT_IN_RANGE(0, 3, &comp);
GENERATE_RANDOM_INT_IN_RANGE(0, 2, &var);
SET_CHAR_PROP_INDEX_TEXTURE(ptype, 1, comp, var);
CHANGE_BLIP_COLOUR(btype, bc);
CHANGE_BLIP_ALPHA(btype, 225);
CHANGE_BLIP_NAME_FROM_ASCII(btype, "Gang member");
GENERATE_RANDOM_INT_IN_RANGE(0, rw, &wep);
GIVE_WEAPON_TO_CHAR(ptype, weapon[wep], AMMO_MAX, FALSE);
SET_CURRENT_CHAR_WEAPON(ptype, weapon[wep], TRUE);
SET_CHAR_CURRENT_WEAPON_VISIBLE(ptype, FALSE);
SET_CHAR_RELATIONSHIP_GROUP(ptype, 24);
SET_CHAR_KEEP_TASK(ptype, TRUE);
if(gwar == 3)
{
SET_CHAR_RELATIONSHIP(ptype, 5, 0);
TASK_COMBAT_HATED_TARGETS_AROUND_CHAR(ptype, 600.0);
}
else if(gwar == 4)
{
if(gkill < 15)
{
SET_CHAR_RELATIONSHIP(ptype, 4, 0);
TASK_WANDER_STANDARD(ptype);
}
else if(gkill >= 16)
{
SET_CHAR_RELATIONSHIP(ptype, 5, 0);
TASK_COMBAT(ptype, GetPlayerPed());
}
}
}
void DeathReset(void)
{
if(IS_CHAR_DEAD(GetPlayerPed()))
{
gwar = 6;
}
}
void Health(void)
{
if(!DOES_PICKUP_EXIST(Hpack))
{
CREATE_PICKUP(1069950328, 23, xb[rl], yb[rl], grnd, &Hpack, 0);
}
}
void ClearEnemy(uint ptype, uint pblip)
{
EXPLODE_CHAR_HEAD(ptype);
TASK_DIE(ptype);
REMOVE_BLIP(pblip);
}
void TurfLogic(void)
{
if(IS_PLAYER_PLAYING(GetPlayerIndex()))
{
GET_CHAR_COORDINATES(GetPlayerPed(), &xp, &yp, &zp);
GET_GROUND_Z_FOR_3D_COORD(xb[rl], yb[rl], 50.0, &grnd);
GET_DISTANCE_BETWEEN_COORDS_3D(xb[rl], yb[rl], grnd, xp, yp, zp, &dist);
if(gwar == 0)
{
GENERATE_RANDOM_INT_IN_RANGE(0, 12, &turf);
GENERATE_RANDOM_INT_IN_RANGE(0, 4, &rl);
gwar = 1;
}
else if(gwar == 1)
{
if(turf == 0)
{
max = 4;
bc = 11;
wname = "AoD Biker War";
xb[0] = -565.8134, yb[0] = 1141.6448;
xb[1] = -444.0590, yb[1] = 1506.8530;
xb[2] = -919.0051, yb[2] = 1034.7878;
model[0] = MODEL_M_M_GBIK_LO_03;
model[1] = MODEL_M_Y_GBIK_HI_01;
model[2] = MODEL_M_Y_GBIK_HI_02;
model[3] = MODEL_M_Y_GBIK02_LO_02;
modveh[0] = MODEL_BURRITO;
modveh[1] = MODEL_HELLFURY;
}
else if(turf == 1)
{
max = 4;
bc = 33;
wname = "Russian Mob War";
xb[0] = 1392.8486, yb[0] = -713.7817;
xb[1] = 934.8259, yb[1] = 34.8259;
xb[2] = 1017.7460, yb[2] = 369.1317;
model[0] = MODEL_M_O_GRUS_HI_01;
model[1] = MODEL_M_Y_GRUS_LO_01;
model[2] = MODEL_M_Y_GRUS_LO_02;
model[3] = MODEL_M_Y_GRUS_HI_02;
modveh[0] = MODEL_REBLA;
modveh[1] = MODEL_SCHAFTER;
}
else if(turf == 2)
{
max = 5;
bc = 19;
wname = "Jamaican War";
xb[0] = 1433.5638, yb[0] = 63.3781;
xb[1] = 1590.3583, yb[1] = 251.8026;
xb[2] = 1232.2589, yb[2] = -65.1774;
model[0] = MODEL_M_M_GJAM_HI_01;
model[1] = MODEL_M_M_GJAM_HI_02;
model[2] = MODEL_M_M_GJAM_HI_03;
model[3] = MODEL_M_Y_GJAM_LO_01;
model[4] = MODEL_M_Y_GJAM_LO_02;
modveh[0] = MODEL_HUNTLEY;
modveh[1] = MODEL_VOODOO;
}
else if(turf == 3)
{
max = 4;
bc = 23;
wname = "Italian Mafia War";
xb[0] = -203.9335, yb[0] = -274.8976;
xb[1] = -447.6903, yb[1] = -224.9006;
xb[2] = -407.6331, yb[2] = 35.0706;
model[0] = MODEL_M_Y_GMAF_HI_01;
model[1] = MODEL_M_Y_GMAF_HI_02;
model[2] = MODEL_M_Y_GMAF_LO_01;
model[3] = MODEL_M_Y_GMAF_LO_02;
modveh[0] = MODEL_PMP600;
modveh[1] = MODEL_SENTINEL;
}
else if(turf == 4)
{
max = 2;
bc = 18;
wname = "Lost Biker War";
xb[0] = -1713.3362, yb[0] = 300.7948;
xb[1] = -1382.6865, yb[1] = 402.5747;
xb[2] = -1469.3313, yb[2] = 243.2719;
model[0] = MODEL_M_Y_GBIK_LO_01;
model[1] = MODEL_M_Y_GBIK_LO_02;
modveh[0] = MODEL_BURRITO2;
modveh[1] = MODEL_ZOMBIEB;
}
else if(turf == 5)
{
max = 4;
bc = 22;
wname = "Latino War";
xb[0] = -220.1503, yb[0] = 1302.1586;
xb[1] = -58.1231, yb[1] = 1350.6831;
xb[2] = -229.1476, yb[2] = 1428.9210;
model[0] = MODEL_M_Y_GLAT_LO_01;
model[1] = MODEL_M_Y_GLAT_LO_02;
model[2] = MODEL_M_Y_GLAT_HI_01;
model[3] = MODEL_M_Y_GLAT_HI_02;
modveh[0] = MODEL_CAVALCADE;
modveh[1] = MODEL_PRIMO;
}
else if(turf == 6)
{
max = 4;
bc = 6;
wname = "Albanian War";
xb[0] = 1315.4991, yb[0] = 1736.0322;
xb[1] = 859.5318, yb[1] = 1582.3088;
xb[2] = 789.4033, yb[2] = 1369.0364;
model[0] = MODEL_M_Y_GALB_LO_01;
model[1] = MODEL_M_Y_GALB_LO_02;
model[2] = MODEL_M_Y_GALB_LO_03;
model[3] = MODEL_M_Y_GALB_LO_04;
modveh[0] = MODEL_FUTO;
modveh[1] = MODEL_HAKUMAI;
}
else if(turf == 7)
{
max = 4;
bc = 7;
wname = "Afro-American War";
xb[0] = 1278.0542, yb[0] = -319.8939;
xb[1] = 1136.3654, yb[1] = -134.2558;
xb[2] = 1268.0599, yb[2] = -152.2401;
model[0] = MODEL_M_Y_GAFR_LO_01;
model[1] = MODEL_M_Y_GAFR_LO_02;
model[2] = MODEL_M_Y_GAFR_HI_01;
model[3] = MODEL_M_Y_GAFR_HI_02;
modveh[0] = MODEL_LANDSTALKER;
modveh[1] = MODEL_PATRIOT;
}
else if(turf == 8)
{
max = 3;
bc = 8;
wname = "Irish War";
xb[0] = 1127.0544, yb[0] = 724.8998;
xb[1] = 1800.5509, yb[1] = 572.2396;
xb[2] = 1345.3091, yb[2] = 660.4424;
model[0] = MODEL_M_Y_GIRI_LO_01;
model[1] = MODEL_M_Y_GIRI_LO_02;
model[2] = MODEL_M_Y_GIRI_LO_03;
modveh[0] = MODEL_E109;
modveh[1] = MODEL_ORACLE;
}
else if(turf == 9)
{
max = 4;
bc = 26;
wname = "Russian War";
xb[0] = 798.3973, yb[0] = -383.1937;
xb[1] = 1073.0067, yb[1] = -445.8488;
xb[2] = 1087.9091, yb[2] = -660.8171;
model[0] = MODEL_M_M_GRU2_HI_01;
model[1] = MODEL_M_M_GRU2_HI_02;
model[2] = MODEL_M_M_GRU2_LO_02;
model[3] = MODEL_M_Y_GRU2_LO_01;
modveh[0] = MODEL_INGOT;
modveh[1] = MODEL_URANUS;
}
else if(turf == 10)
{
max = 2;
bc = 13;
wname = "Korean War";
xb[0] = -1176.2178, yb[0] = 1036.4456;
xb[1] = -1454.7412, yb[1] = 1051.7816;
xb[2] = -1395.1597, yb[2] = 853.1685;
model[0] = MODEL_M_Y_GKOR_LO_01;
model[1] = MODEL_M_Y_GKOR_LO_02;
modveh[0] = MODEL_PRES;
modveh[1] = MODEL_SULTAN;
}
else if(turf == 11)
{
max = 4;
bc = 12;
wname = "Triad War";
xb[0] = 64.5832, yb[0] = -450.9595;
xb[1] = -6.4329, yb[1] = -318.8659;
xb[2] = 148.7226, yb[2] = -577.0952;
model[0] = MODEL_M_M_GTRI_HI_01;
model[1] = MODEL_M_M_GTRI_HI_02;
model[2] = MODEL_M_Y_GTRI_LO_01;
model[3] = MODEL_M_Y_GTRI_LO_02;
modveh[0] = MODEL_FEROCI;
modveh[1] = MODEL_INTRUDER;
}
gwar = 2;
}
else if(gwar == 2)
{
ADD_BLIP_FOR_COORD(xb[rl], yb[rl], grnd, &Gbase);
CHANGE_BLIP_SPRITE(Gbase, BLIP_MULTIPLAYER_TUTORIAL);
CHANGE_BLIP_NAME_FROM_ASCII(Gbase, wname);
CHANGE_BLIP_COLOUR(Gbase, bc);
CHANGE_BLIP_ALPHA(Gbase, 225);
ADD_BLIP_FOR_COORD(xb[rl], yb[rl], grnd, &gps);
CHANGE_BLIP_DISPLAY(gps, 1);
CHANGE_BLIP_COLOUR(gps, bc);
CHANGE_BLIP_ALPHA(Gbase, 225);
SET_ROUTE(gps, TRUE);
Print("Go In Territory To Trigger Gang War !");
gwar = 3;
}
else if(gwar == 3)
{
if(dist < 50.0)
{
if(!IS_CHAR_IN_ANY_HELI(GetPlayerPed()))
{
gkill = 0;
Print(" You Entered Gang Territory !");
SET_ROUTE(gps, FALSE);
REMOVE_BLIP(gps);
gwar = 4;
}
}
}
else if(gwar == 4)
{
uint I;
for (I = 0; I <= 14; I++)
{
if(!DOES_CHAR_EXIST(gang))
{
float dista, distb;
GetSafeCoords();
GET_DISTANCE_BETWEEN_COORDS_3D(xp, yp, zp, sx, sy, sz, &dista);
GET_DISTANCE_BETWEEN_COORDS_3D(xb[rl], yb[rl], grnd, sx, sy, sz, &distb);
if(dista > 35.0 && distb < 150.0)
{
uint rm;
uint wep;
GENERATE_RANDOM_INT_IN_RANGE(0, max, &rm);
GENERATE_RANDOM_INT_IN_RANGE(0, 16, &wep);
REQUEST_MODEL(model[rm]);
while (!HAS_MODEL_LOADED(model[rm])) WAIT(0);
CREATE_CHAR(16, model[rm], sx, sy, sz, &gang, true);
ADD_BLIP_FOR_CHAR(gang, &members);
Set(gang, members, 16);
MARK_MODEL_AS_NO_LONGER_NEEDED(model[rm]);
gset++;
if(gset == 15)
{
gwar = 5;
gset = 0;
}
}
}
}
if(dist >= 180.0)
{
Print(" You Fled War Zone , Poor Show !");
gwar = 6;
}
}
else if(gwar == 5)
{
CLEAR_WANTED_LEVEL(GetPlayerIndex());
ALLOW_EMERGENCY_SERVICES(FALSE);
SET_MAX_WANTED_LEVEL(0);
SET_CHAR_WANTED_BY_POLICE(GetPlayerPed(), FALSE);
if(dist > 160.0 && dist < 180.0)
{
DRAW_CHECKPOINT_WITH_ALPHA(xb[rl], yb[rl], 0.0, 260.0, 200, 200, 200, 100);
Print(" Your Getting Too Far , Get Back In War Zone !");
}
else if(dist >= 180.0)
{
Print(" You Fled War Zone , Poor Show !");
gwar = 6;
}
}
else if(gwar == 6)
{
ALLOW_EMERGENCY_SERVICES(TRUE);
SET_MAX_WANTED_LEVEL(6);
REMOVE_BLIP(Gbase);
REMOVE_BLIP(gps);
REMOVE_PICKUP(Hpack);
WAIT(3000);
gwar = 0;
}
}
}
void GangLogic(void)
{
uint I;
for (I = 0; I <= 14; I++)
{
if(DOES_CHAR_EXIST(gang))
{
float zx, zy, zz, distc;
GET_CHAR_COORDINATES(gang, &zx, &zy, &zz);
GET_DISTANCE_BETWEEN_COORDS_3D(xb[rl], yb[rl], grnd, zx, zy, zz, &distc);
if(distc > 160.0)
{
float distd, diste;
GetSafeCoords();
GET_DISTANCE_BETWEEN_COORDS_3D(xp, yp, zp, sx, sy, sz, &distd);
GET_DISTANCE_BETWEEN_COORDS_3D(xb[rl], yb[rl], grnd, sx, sy, sz, &diste);
if(distd > 35.0 && diste < 150.0)
{
SET_CHAR_COORDINATES_NO_OFFSET(gang, sx, sy, sz);
}
}
else if(IS_CHAR_DEAD(gang) || IS_CHAR_DEAD(GetPlayerPed()) || gwar == 6)
{
ClearEnemy(gang, members);
MARK_CHAR_AS_NO_LONGER_NEEDED(&gang);
if(gwar < 6)
{
gkill++;
}
}
}
}
}
void DriveByGen(void)
{
if(IS_PLAYER_PLAYING(GetPlayerIndex()))
{
if(gwar == 3)
{
if(dbgen == 0)
{
float x, y, z, h;
GET_NTH_CLOSEST_CAR_NODE_WITH_HEADING(xp, yp, zp, 200, &x, &y, &z, &h);
if(!DOES_VEHICLE_EXIST(ccar))
{
uint veh;
GENERATE_RANDOM_INT_IN_RANGE(0, 2, &veh);
REQUEST_MODEL(modveh[veh]);
while (!HAS_MODEL_LOADED(modveh[veh])) WAIT(0);
CLEAR_AREA_OF_CARS(x, y, z, 25.0);
CREATE_CAR(modveh[veh], x, y, z, &ccar, true);
SET_CAR_HEADING(ccar, h);
MARK_MODEL_AS_NO_LONGER_NEEDED(modveh[veh]);
return ccar;
}
else if(DOES_VEHICLE_EXIST(ccar))
{
if(!DOES_CHAR_EXIST(dped))
{
uint drm;
GENERATE_RANDOM_INT_IN_RANGE(0, max, &drm);
REQUEST_MODEL(model[drm]);
while (!HAS_MODEL_LOADED(model[drm])) WAIT(0);
CREATE_CHAR_INSIDE_CAR(ccar, 16, model[drm], &dped);
ADD_BLIP_FOR_CHAR(dped, &bdp);
Set(dped, bdp, 16);
MARK_MODEL_AS_NO_LONGER_NEEDED(model[drm]);
uint I;
for (I = 0; I <= 2; I++)
{
if(!DOES_CHAR_EXIST(pped))
{
if(IS_CAR_PASSENGER_SEAT_FREE(ccar, I))
{
uint prm;
GENERATE_RANDOM_INT_IN_RANGE(0, max, &prm);
REQUEST_MODEL(model[prm]);
while (!HAS_MODEL_LOADED(model[prm])) WAIT(0);
CREATE_CHAR_AS_PASSENGER(ccar, 16, model[prm], I, &pped);
ADD_BLIP_FOR_CHAR(pped, &bpp);
Set(pped, bpp, 3);
MARK_MODEL_AS_NO_LONGER_NEEDED(model[prm]);
}
}
}
}
dbgen = 1;
}
}
}
}
}
void CarLogic(void)
{
if(DOES_VEHICLE_EXIST(ccar))
{
float vx, vy, vz, distf;
GET_CAR_COORDINATES(ccar, &vx, &vy, &vz);
GET_DISTANCE_BETWEEN_COORDS_3D(xp, yp, zp, vx, vy, vz, &distf);
if(IS_CAR_DEAD(ccar) || distf > 400.0 || gwar >= 4)
{
MARK_CAR_AS_NO_LONGER_NEEDED(&ccar);
}
}
}
void DriverLogic(void)
{
if(DOES_CHAR_EXIST(dped))
{
float dx, dy, dz, distg;
GET_CHAR_COORDINATES(dped, &dx, &dy, &dz);
GET_DISTANCE_BETWEEN_COORDS_3D(xp, yp, zp, dx, dy, dz, &distg);
if(DOES_VEHICLE_EXIST(ccar))
{
if(IS_CHAR_SITTING_IN_CAR(dped, ccar))
{
if(distg > 20.0)
{
TASK_CAR_MISSION_PED_TARGET(dped, ccar, GetPlayerPed(), 2, 35.0, 2, 0, 10);
}
}
}
if(IS_CHAR_DEAD(dped) || distg > 400.0 || gwar >= 4)
{
ClearEnemy(dped, bdp);
MARK_CHAR_AS_NO_LONGER_NEEDED(&dped);
}
}
}
void DBPLogic(void)
{
uint I;
for (I = 0; I <= 2; I++)
{
if(DOES_CHAR_EXIST(pped))
{
float px, py, pz, disth;
GET_CHAR_COORDINATES(pped, &px, &py, &pz);
GET_DISTANCE_BETWEEN_COORDS_3D(xp, yp, zp, px, py, pz, &disth);
if(IS_CHAR_DEAD(pped) || disth > 400.0 || gwar >= 4)
{
ClearEnemy(pped, bpp);
MARK_CHAR_AS_NO_LONGER_NEEDED(&pped);
}
}
}
}
void SpawnDBLogic(void)
{
if(dbgen == 1)
{
if(!DOES_VEHICLE_EXIST(ccar) && !DOES_CHAR_EXIST(dped) && !DOES_CHAR_EXIST(pped[0]) && !DOES_CHAR_EXIST(pped[1]) && !DOES_CHAR_EXIST(pped[2]))
{
dbgen = 0;
}
}
}
void WarWaves(void)
{
if(gwar == 5)
{
if(gkill == 1)
{
FLASH_BLIP(Gbase, TRUE);
Print("You Provoked a Gang War !!!");
gkill++;
}
else if(gkill == 16)
{
Print("You Survived 1st Wave");
Health();
WAIT(3000);
Print("Gang War 2nd Wave");
gwar = 4;
gkill++;
}
else if(gkill == 32)
{
REMOVE_PICKUP(Hpack);
Print("You Survived 2nd Wave");
Health();
WAIT(3000);
Print("Gang War 3rd Wave");
gwar = 4;
gkill++;
}
else if(gkill == 48)
{
REMOVE_PICKUP(Hpack);
Print("You Survived 3rd Wave");
Health();
WAIT(3000);
Print("Gang War final Wave");
gwar = 4;
gkill++;
}
else if(gkill == 64)
{
Print("You Survived Final Wave");
REMOVE_BLIP(Gbase);
gwar = 6;
}
}
}
void DisableGWm(void)
{
if(IsKeyPressed(VK_TAB,VK_CONTROL))
{
Print("Gang-War Minigame Disabled");
SET_MAX_WANTED_LEVEL(mlvl);
SET_INT_STAT(363, stat);
ALLOW_EMERGENCY_SERVICES(TRUE);
SET_POLICE_IGNORE_PLAYER(GetPlayerIndex(), FALSE);
TERMINATE_THIS_SCRIPT();
}
}
void main(void)
{
InitSet();
while (TRUE)
{
WAIT(0);
DeathReset();
TurfLogic();
GangLogic();
DriveByGen();
CarLogic();
DriverLogic();
DBPLogic();
SpawnDBLogic();
WarWaves();
DisableGWm();
}
}
and I want to compile it to a script mod. How to do that? I mean how to compile from .cpp to .net.dll? I have no idea :/

Share this post


Link to post
Share on other sites
Jitnaught

A .cpp file (which contains C++ code) does not compile to a .net.dll file. A .net.dll file is compiled from C# or VB. If you want to compile to a .net.dll file, you need to convert that C++/Scripthook code to C# or VB/.NET Scripthook code, which really isn't converting, more like rewriting.

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
yoloman

Okay, and which program is recommended to compile?

Share this post


Link to post
Share on other sites
Jitnaught

Visual Studio

Share this post


Link to post
Share on other sites
leftas

Why net.dll, when you can in .asi ?

 

All best,

Paul.

Share this post


Link to post
Share on other sites
NTAuthority

this seems like a scocl script though

Share this post


Link to post
Share on other sites
Jitnaught

this seems like a scocl script though

True

Share this post


Link to post
Share on other sites
yoloman

Oh, that means i can't use it for PC?

Share this post


Link to post
Share on other sites
Jitnaught

You can

Share this post


Link to post
Share on other sites
yoloman

Yeah, but the problem is that I need a Modmanager for .sco mods and the most Modmanagers are only compactible with Ps3 or Xbox360

Share this post


Link to post
Share on other sites
Jitnaught

Yeah, but the problem is that I need a Modmanager for .sco mods and the most Modmanagers are only compactible with Ps3 or Xbox360

You don't need a mod manager to run your mod.

Share this post


Link to post
Share on other sites
yoloman

Okay, I just thought because for Ps3 most sco mods need a Modmanager

Share this post


Link to post
Share on other sites
NTAuthority

You can just make a .NET script to use the START_NEW_SCRIPT native to invoke it - no need for a 'mod manager'.

Share this post


Link to post
Share on other sites
yoloman

But I thought that I don't need a Mod Manager to start .sco scripts

Share this post


Link to post
Share on other sites
yoloman

Okay thanks :D

Share this post


Link to post
Share on other sites
byteMe420

.............

Edited by byteMe420

Share this post


Link to post
Share on other sites
byteMe420

 

and I want to compile it to a script mod. How to do that? I mean how to compile from .cpp to .net.dll? I have no idea :/

 

:)

Share this post


Link to post
Share on other sites
yoloman

.............

 

?

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  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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