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

Reck1501

Replace bullets with objects/vehicles?

Recommended Posts

Reck1501

How do you replace bullets with objects or vehicles? Such as when you shoot, it shoots a dildo instead of the bullet model (lel)

Share this post


Link to post
Share on other sites
FixingG00D

I hope someone figures this one out. Has great potential as a mod. Someones done a vehicle canon mod already.

Share this post


Link to post
Share on other sites
flocraftMods

I made the vehicle cannon but it just shoot with vehicles additionally

Share this post


Link to post
Share on other sites
alloc8or

Simply use Endeavour.asi or do you want to make your own mod?

Share this post


Link to post
Share on other sites
Reck1501

I'd like to make my own mod, I know alot of menus already have these types of features, but I find coding these mods very interesting

 

I made the vehicle cannon but it just shoot with vehicles additionally

 

How did you do that? :p

Edited by Reck1501

Share this post


Link to post
Share on other sites
flocraftMods

I set a car in front of the player and set the speed very fast

Edited by flocraftMods

Share this post


Link to post
Share on other sites
Marqurs

hopefully we get source

Edited by Marqurs

Share this post


Link to post
Share on other sites
flocraftMods

Ok here is the main code to shoot with random vehicles:

LPCSTR vehicleModels[188] = {"ARMYTANKER", "ASTEROPE", "AIRTUG", "AMBULANCE", "BARRACKS", "BARRACKS2", "BALLER", "BALLER2",	"BJXL", "BANSHEE", "BFINJECTION", "BIFF", "BLAZER", "BLAZER2", "BLAZER3", "BISON", "BISON2",	"BISON3", "BOXVILLE", "BOXVILLE2", "BOXVILLE3", "BOBCATXL", "BODHI2", "BUCCANEER", "BUFFALO", "BUFFALO2", "BULLDOZER",	"BULLET", "BURRITO", "BURRITO2", "BURRITO3", "BURRITO4", "BURRITO5", "CAVALCADE", "CAVALCADE2", "POLICET",	"GBURRITO", "CABLECAR", "CADDY", "CADDY2", "CAMPER", "CARBONIZZARE", "CHEETAH", "COMET2", "COGCABRIO", "COQUETTE",	"CUTTER", "GRESLEY", "DILETTANTE", "DILETTANTE2", "DUNE", "DUNE2", "HOTKNIFE", "DLOADER", "DUBSTA", "DUBSTA2",	"DUMP", "RUBBLE", "DOCKTUG", "DOMINATOR", "EMPEROR", "EMPEROR2", "EMPEROR3", "ENTITYXF", "EXEMPLAR", "ELEGY2",	"F620", "FBI", "FBI2", "FELON", "FELON2", "FELTZER2", "FIRETRUK", "FLATBED", "FORKLIFT", "FQ2",	"FUSILADE", "FUGITIVE", "FUTO", "GRANGER", "GAUNTLET", "HABANERO", "HAULER", "HANDLER", "INFERNUS", "INGOT",	"INTRUDER", "ISSI2", "JACKAL", "JOURNEY", "JB700", "KHAMELION", "LANDSTALKER", "LGUARD", "MANANA", "MESA",	"MESA2", "MESA3", "CRUSADER", "MINIVAN", "MIXER", "MIXER2", "MONROE", "MOWER", "MULE", "MULE2",	"ORACLE", "ORACLE2", "PACKER", "PATRIOT", "PBUS", "PENUMBRA", "PEYOTE", "PHANTOM", "PHOENIX", "PICADOR",	"POUNDER", "POLICE", "POLICE4", "POLICE2", "POLICE3", "POLICEOLD1", "POLICEOLD2", "PONY", "PONY2", "PRAIRIE",	"PRANGER", "PREMIER", "PRIMO",  "RANCHERXL", "RANCHERXL2", "RAPIDGT", "RAPIDGT2", "RADI", "RATLOADER",	"REBEL", "REGINA", "REBEL2", "RENTALBUS", "RUINER", "RUMPO", "RUMPO2", "RHINO", "RIOT", "RIPLEY",	"ROCOTO", "ROMERO", "SABREGT", "SADLER", "SADLER2", "SANDKING", "SANDKING2", "SCHAFTER2", "SCHWARZER", "SCRAP",	"SEMINOLE", "SENTINEL", "SENTINEL2", "ZION", "ZION2", "SERRANO", "SHERIFF", "SHERIFF2", "SPEEDO", "SPEEDO2",	"STANIER", "STINGER", "STINGERGT", "STOCKADE", "STOCKADE3", "STRATUM", "SULTAN", "SUPERD", "SURANO", "SURFER",	"SURFER2", "SURGE", "TAILGATER", "TAXI", "TRASH", "TRACTOR", "TRACTOR2", "TRACTOR3", "TOWTRUCK",	"TOWTRUCK2","UTILLITRUCK", "UTILLITRUCK2", "UTILLITRUCK3"};float offset;Ped playerPed = PLAYER::PLAYER_PED_ID();        DWORD model = GAMEPLAY::GET_HASH_KEY((char *)vehicleModels[rand() % 188]);STREAMING::REQUEST_MODEL(model);while (!STREAMING::HAS_MODEL_LOADED(model)) WAIT(0);if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_A_VEHICLE(model)){    Vector3 dim1, dim2;    GAMEPLAY::GET_MODEL_DIMENSIONS(model, &dim1, &dim2);    offset = dim2.y * 1.6;}   Vector3 dir = ENTITY::GET_ENTITY_FORWARD_VECTOR(playerPed);Vector3 pos = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1);float rot = (ENTITY::GET_ENTITY_ROTATION(playerPed, 0)).z;Vehicle veh = VEHICLE::CREATE_VEHICLE(model, pos.x + (dir.x * offset) , pos.y + (dir.y * offset) , pos.z , rot, 1, 1);VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh);        VEHICLE::SET_VEHICLE_FORWARD_SPEED(veh, 70.0);   STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&veh);

I will try to shoot 3D in vehicle cannon v2 :lol:

Edited by flocraftMods

Share this post


Link to post
Share on other sites
Reck1501

Ok here is the main code to shoot with random vehicles:

LPCSTR vehicleModels[188] = {"ARMYTANKER", "ASTEROPE", "AIRTUG", "AMBULANCE", "BARRACKS", "BARRACKS2", "BALLER", "BALLER2",	"BJXL", "BANSHEE", "BFINJECTION", "BIFF", "BLAZER", "BLAZER2", "BLAZER3", "BISON", "BISON2",	"BISON3", "BOXVILLE", "BOXVILLE2", "BOXVILLE3", "BOBCATXL", "BODHI2", "BUCCANEER", "BUFFALO", "BUFFALO2", "BULLDOZER",	"BULLET", "BURRITO", "BURRITO2", "BURRITO3", "BURRITO4", "BURRITO5", "CAVALCADE", "CAVALCADE2", "POLICET",	"GBURRITO", "CABLECAR", "CADDY", "CADDY2", "CAMPER", "CARBONIZZARE", "CHEETAH", "COMET2", "COGCABRIO", "COQUETTE",	"CUTTER", "GRESLEY", "DILETTANTE", "DILETTANTE2", "DUNE", "DUNE2", "HOTKNIFE", "DLOADER", "DUBSTA", "DUBSTA2",	"DUMP", "RUBBLE", "DOCKTUG", "DOMINATOR", "EMPEROR", "EMPEROR2", "EMPEROR3", "ENTITYXF", "EXEMPLAR", "ELEGY2",	"F620", "FBI", "FBI2", "FELON", "FELON2", "FELTZER2", "FIRETRUK", "FLATBED", "FORKLIFT", "FQ2",	"FUSILADE", "FUGITIVE", "FUTO", "GRANGER", "GAUNTLET", "HABANERO", "HAULER", "HANDLER", "INFERNUS", "INGOT",	"INTRUDER", "ISSI2", "JACKAL", "JOURNEY", "JB700", "KHAMELION", "LANDSTALKER", "LGUARD", "MANANA", "MESA",	"MESA2", "MESA3", "CRUSADER", "MINIVAN", "MIXER", "MIXER2", "MONROE", "MOWER", "MULE", "MULE2",	"ORACLE", "ORACLE2", "PACKER", "PATRIOT", "PBUS", "PENUMBRA", "PEYOTE", "PHANTOM", "PHOENIX", "PICADOR",	"POUNDER", "POLICE", "POLICE4", "POLICE2", "POLICE3", "POLICEOLD1", "POLICEOLD2", "PONY", "PONY2", "PRAIRIE",	"PRANGER", "PREMIER", "PRIMO",  "RANCHERXL", "RANCHERXL2", "RAPIDGT", "RAPIDGT2", "RADI", "RATLOADER",	"REBEL", "REGINA", "REBEL2", "RENTALBUS", "RUINER", "RUMPO", "RUMPO2", "RHINO", "RIOT", "RIPLEY",	"ROCOTO", "ROMERO", "SABREGT", "SADLER", "SADLER2", "SANDKING", "SANDKING2", "SCHAFTER2", "SCHWARZER", "SCRAP",	"SEMINOLE", "SENTINEL", "SENTINEL2", "ZION", "ZION2", "SERRANO", "SHERIFF", "SHERIFF2", "SPEEDO", "SPEEDO2",	"STANIER", "STINGER", "STINGERGT", "STOCKADE", "STOCKADE3", "STRATUM", "SULTAN", "SUPERD", "SURANO", "SURFER",	"SURFER2", "SURGE", "TAILGATER", "TAXI", "TRASH", "TRACTOR", "TRACTOR2", "TRACTOR3", "TOWTRUCK",	"TOWTRUCK2","UTILLITRUCK", "UTILLITRUCK2", "UTILLITRUCK3"};float offset;Ped playerPed = PLAYER::PLAYER_PED_ID();        DWORD model = GAMEPLAY::GET_HASH_KEY((char *)vehicleModels[rand() % 188]);STREAMING::REQUEST_MODEL(model);while (!STREAMING::HAS_MODEL_LOADED(model)) WAIT(0);if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_A_VEHICLE(model)){    Vector3 dim1, dim2;    GAMEPLAY::GET_MODEL_DIMENSIONS(model, &dim1, &dim2);    offset = dim2.y * 1.6;}   Vector3 dir = ENTITY::GET_ENTITY_FORWARD_VECTOR(playerPed);Vector3 pos = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1);float rot = (ENTITY::GET_ENTITY_ROTATION(playerPed, 0)).z;Vehicle veh = VEHICLE::CREATE_VEHICLE(model, pos.x + (dir.x * offset) , pos.y + (dir.y * offset) , pos.z , rot, 1, 1);VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh);        VEHICLE::SET_VEHICLE_FORWARD_SPEED(veh, 70.0);   STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&veh);

I will try to shoot 3D in vehicle cannon v2 :lol:

 

Oh cool! Thanks for the source mate! :D Also looking forward to version 2 :p

Edited by Reck1501

Share this post


Link to post
Share on other sites
flocraftMods

I just linked it with the shooting buttons and the time between the cars is needed to load the models

Share this post


Link to post
Share on other sites
Reck1501

I just linked it with the shooting buttons and the time between the cars is needed to load the models

 

I figured it out myself :p But linking it with the shooting buttons is kind of.. unnecessary. It's better to use IS_PED_SHOOTING

Share this post


Link to post
Share on other sites
Rooster Mods

Ok here is the main code to shoot with random vehicles:

LPCSTR vehicleModels[188] = {"ARMYTANKER", "ASTEROPE", "AIRTUG", "AMBULANCE", "BARRACKS", "BARRACKS2", "BALLER", "BALLER2",	"BJXL", "BANSHEE", "BFINJECTION", "BIFF", "BLAZER", "BLAZER2", "BLAZER3", "BISON", "BISON2",	"BISON3", "BOXVILLE", "BOXVILLE2", "BOXVILLE3", "BOBCATXL", "BODHI2", "BUCCANEER", "BUFFALO", "BUFFALO2", "BULLDOZER",	"BULLET", "BURRITO", "BURRITO2", "BURRITO3", "BURRITO4", "BURRITO5", "CAVALCADE", "CAVALCADE2", "POLICET",	"GBURRITO", "CABLECAR", "CADDY", "CADDY2", "CAMPER", "CARBONIZZARE", "CHEETAH", "COMET2", "COGCABRIO", "COQUETTE",	"CUTTER", "GRESLEY", "DILETTANTE", "DILETTANTE2", "DUNE", "DUNE2", "HOTKNIFE", "DLOADER", "DUBSTA", "DUBSTA2",	"DUMP", "RUBBLE", "DOCKTUG", "DOMINATOR", "EMPEROR", "EMPEROR2", "EMPEROR3", "ENTITYXF", "EXEMPLAR", "ELEGY2",	"F620", "FBI", "FBI2", "FELON", "FELON2", "FELTZER2", "FIRETRUK", "FLATBED", "FORKLIFT", "FQ2",	"FUSILADE", "FUGITIVE", "FUTO", "GRANGER", "GAUNTLET", "HABANERO", "HAULER", "HANDLER", "INFERNUS", "INGOT",	"INTRUDER", "ISSI2", "JACKAL", "JOURNEY", "JB700", "KHAMELION", "LANDSTALKER", "LGUARD", "MANANA", "MESA",	"MESA2", "MESA3", "CRUSADER", "MINIVAN", "MIXER", "MIXER2", "MONROE", "MOWER", "MULE", "MULE2",	"ORACLE", "ORACLE2", "PACKER", "PATRIOT", "PBUS", "PENUMBRA", "PEYOTE", "PHANTOM", "PHOENIX", "PICADOR",	"POUNDER", "POLICE", "POLICE4", "POLICE2", "POLICE3", "POLICEOLD1", "POLICEOLD2", "PONY", "PONY2", "PRAIRIE",	"PRANGER", "PREMIER", "PRIMO",  "RANCHERXL", "RANCHERXL2", "RAPIDGT", "RAPIDGT2", "RADI", "RATLOADER",	"REBEL", "REGINA", "REBEL2", "RENTALBUS", "RUINER", "RUMPO", "RUMPO2", "RHINO", "RIOT", "RIPLEY",	"ROCOTO", "ROMERO", "SABREGT", "SADLER", "SADLER2", "SANDKING", "SANDKING2", "SCHAFTER2", "SCHWARZER", "SCRAP",	"SEMINOLE", "SENTINEL", "SENTINEL2", "ZION", "ZION2", "SERRANO", "SHERIFF", "SHERIFF2", "SPEEDO", "SPEEDO2",	"STANIER", "STINGER", "STINGERGT", "STOCKADE", "STOCKADE3", "STRATUM", "SULTAN", "SUPERD", "SURANO", "SURFER",	"SURFER2", "SURGE", "TAILGATER", "TAXI", "TRASH", "TRACTOR", "TRACTOR2", "TRACTOR3", "TOWTRUCK",	"TOWTRUCK2","UTILLITRUCK", "UTILLITRUCK2", "UTILLITRUCK3"};float offset;Ped playerPed = PLAYER::PLAYER_PED_ID();        DWORD model = GAMEPLAY::GET_HASH_KEY((char *)vehicleModels[rand() % 188]);STREAMING::REQUEST_MODEL(model);while (!STREAMING::HAS_MODEL_LOADED(model)) WAIT(0);if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_A_VEHICLE(model)){    Vector3 dim1, dim2;    GAMEPLAY::GET_MODEL_DIMENSIONS(model, &dim1, &dim2);    offset = dim2.y * 1.6;}   Vector3 dir = ENTITY::GET_ENTITY_FORWARD_VECTOR(playerPed);Vector3 pos = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1);float rot = (ENTITY::GET_ENTITY_ROTATION(playerPed, 0)).z;Vehicle veh = VEHICLE::CREATE_VEHICLE(model, pos.x + (dir.x * offset) , pos.y + (dir.y * offset) , pos.z , rot, 1, 1);VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh);        VEHICLE::SET_VEHICLE_FORWARD_SPEED(veh, 70.0);   STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&veh);

I will try to shoot 3D in vehicle cannon v2 :lol:

Do u know how to make a car spawn?

Share this post


Link to post
Share on other sites
alloc8or

This is from the Native Trainer :whistle: (Don't know if it's the full code :panic: )

Correct me if it's wrong! :lol:

LPCSTR modelName = vehicleModels[carspawnActiveLineIndex][carspawnActiveItemIndex];            DWORD model = GAMEPLAY::GET_HASH_KEY((char *)modelName);            if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_A_VEHICLE(model))            {                STREAMING::REQUEST_MODEL(model);                                while (!STREAMING::HAS_MODEL_LOADED(model)) WAIT(0);                Vector3 coords = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER::PLAYER_PED_ID(), 0.0, 5.0, 0.0);                Vehicle veh = VEHICLE::CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, 1, 1);                VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh);                WAIT(0);                STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);                ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&veh);                return true;            }
Edited by Unknown_Modder

Share this post


Link to post
Share on other sites
FreeOffset

Here is code I made to spawn pickup objects (40k money bag in this instance), can be anything from http://ecb2.biz/releases/GTAV/lists/pickups.txtand PICKUP_PARACHUTE will be a parachute in your inventory, not money.

if (featureMoneyGun) {        if (PED::IS_PED_SHOOTING(PLAYER::PLAYER_PED_ID()))        {            float tmp[3];            WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD(PLAYER::PLAYER_PED_ID(), tmp);            OBJECT::CREATE_AMBIENT_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_MED_BAG"), tmp[0], tmp[2], tmp[4], 0, 40000, 1, 0, 1);	}}

you could also spawn non pickup objects with any item from this list http://ecb2.biz/releases/GTAV/lists/objects.txtvia

OBJECT::CREATE_OBJECT(GAMEPLAY::GET_HASH_KEY("prop_tree_pine_01"), tmp[0], tmp[2], tmp[4], 0, 0, 1);

instead of CREATE_AMBIENT_PICKUP.

Edited by FreeOffset

Share this post


Link to post
Share on other sites
Rooster Mods

Here is code I made to spawn pickup objects (40k money bag in this instance), can be anything from http://ecb2.biz/releases/GTAV/lists/pickups.txtand PICKUP_PARACHUTE will be a parachute in your inventory, not money.

if (featureMoneyGun) {        if (PED::IS_PED_SHOOTING(PLAYER::PLAYER_PED_ID()))        {            float tmp[3];            WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD(PLAYER::PLAYER_PED_ID(), tmp);            OBJECT::CREATE_AMBIENT_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_MED_BAG"), tmp[0], tmp[2], tmp[4], 0, 40000, 1, 0, 1);	}}

you could also spawn non pickup objects with any item from this list http://ecb2.biz/releases/GTAV/lists/objects.txtvia

OBJECT::CREATE_OBJECT(GAMEPLAY::GET_HASH_KEY("prop_tree_pine_01"), tmp[0], tmp[2], tmp[4], 0, 0, 1);

instead of CREATE_AMBIENT_PICKUP.

Please help me any 1

this is what I get

http://postimg.org/image/sjdztf6f1/

Edited by Rooster Mods

Share this post


Link to post
Share on other sites
FreeOffset

 

Here is code I made to spawn pickup objects (40k money bag in this instance), can be anything from http://ecb2.biz/releases/GTAV/lists/pickups.txtand PICKUP_PARACHUTE will be a parachute in your inventory, not money.

if (featureMoneyGun) {        if (PED::IS_PED_SHOOTING(PLAYER::PLAYER_PED_ID()))        {            float tmp[3];            WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD(PLAYER::PLAYER_PED_ID(), tmp);            OBJECT::CREATE_AMBIENT_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_MED_BAG"), tmp[0], tmp[2], tmp[4], 0, 40000, 1, 0, 1);	}}

you could also spawn non pickup objects with any item from this list http://ecb2.biz/releases/GTAV/lists/objects.txtvia

OBJECT::CREATE_OBJECT(GAMEPLAY::GET_HASH_KEY("prop_tree_pine_01"), tmp[0], tmp[2], tmp[4], 0, 0, 1);

instead of CREATE_AMBIENT_PICKUP.

Please help me any 1

this is what I get

http://postimg.org/image/sjdztf6f1/

 

 

Go to natives.h and update GET_PED_LAST_WEAPON_IMPACT_COORD to this

static Any GET_PED_LAST_WEAPON_IMPACT_COORD(Ped Handle, float* Coords) { return invoke<Any>(0x6C4D0409BA1A2BC2, Handle, Coords); } // 6C4D0409BA1A2BC2 9B266079

natives.h still gets updated even though the sdk doesn't (I don't think it does atleast)

Share this post


Link to post
Share on other sites
Rooster Mods

 

 

Here is code I made to spawn pickup objects (40k money bag in this instance), can be anything from http://ecb2.biz/releases/GTAV/lists/pickups.txtand PICKUP_PARACHUTE will be a parachute in your inventory, not money.

if (featureMoneyGun) {        if (PED::IS_PED_SHOOTING(PLAYER::PLAYER_PED_ID()))        {            float tmp[3];            WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD(PLAYER::PLAYER_PED_ID(), tmp);            OBJECT::CREATE_AMBIENT_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_MED_BAG"), tmp[0], tmp[2], tmp[4], 0, 40000, 1, 0, 1);	}}

you could also spawn non pickup objects with any item from this list http://ecb2.biz/releases/GTAV/lists/objects.txtvia

OBJECT::CREATE_OBJECT(GAMEPLAY::GET_HASH_KEY("prop_tree_pine_01"), tmp[0], tmp[2], tmp[4], 0, 0, 1);

instead of CREATE_AMBIENT_PICKUP.

Please help me any 1

this is what I get

http://postimg.org/image/sjdztf6f1/

 

 

Go to natives.h and update GET_PED_LAST_WEAPON_IMPACT_COORD to this

static Any GET_PED_LAST_WEAPON_IMPACT_COORD(Ped Handle, float* Coords) { return invoke<Any>(0x6C4D0409BA1A2BC2, Handle, Coords); } // 6C4D0409BA1A2BC2 9B266079

natives.h still gets updated even though the sdk doesn't (I don't think it does atleast)

 

Why do I freeze when I enable it and then shoot

I think its because im looping it

Edited by Rooster Mods

Share this post


Link to post
Share on other sites
FreeOffset

 

 

 

Here is code I made to spawn pickup objects (40k money bag in this instance), can be anything from http://ecb2.biz/releases/GTAV/lists/pickups.txtand PICKUP_PARACHUTE will be a parachute in your inventory, not money.

if (featureMoneyGun) {        if (PED::IS_PED_SHOOTING(PLAYER::PLAYER_PED_ID()))        {            float tmp[3];            WEAPON::GET_PED_LAST_WEAPON_IMPACT_COORD(PLAYER::PLAYER_PED_ID(), tmp);            OBJECT::CREATE_AMBIENT_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_MED_BAG"), tmp[0], tmp[2], tmp[4], 0, 40000, 1, 0, 1);	}}

you could also spawn non pickup objects with any item from this list http://ecb2.biz/releases/GTAV/lists/objects.txtvia

OBJECT::CREATE_OBJECT(GAMEPLAY::GET_HASH_KEY("prop_tree_pine_01"), tmp[0], tmp[2], tmp[4], 0, 0, 1);

instead of CREATE_AMBIENT_PICKUP.

Please help me any 1

this is what I get

http://postimg.org/image/sjdztf6f1/

 

 

Go to natives.h and update GET_PED_LAST_WEAPON_IMPACT_COORD to this

static Any GET_PED_LAST_WEAPON_IMPACT_COORD(Ped Handle, float* Coords) { return invoke<Any>(0x6C4D0409BA1A2BC2, Handle, Coords); } // 6C4D0409BA1A2BC2 9B266079

natives.h still gets updated even though the sdk doesn't (I don't think it does atleast)

 

Why do I freeze when I enable it and then shoot

I think its because im looping it

 

I put the following code in void update_features() which loops all the code in it. Are you freezing because of the Create Ambient Pickup or Create Pickup calls? or the Get ped last weapon impact coord call? Figure out by commenting out code.

Share this post


Link to post
Share on other sites
holyswordman

Ok here is the main code to shoot with random vehicles:

LPCSTR vehicleModels[188] = {"ARMYTANKER", "ASTEROPE", "AIRTUG", "AMBULANCE", "BARRACKS", "BARRACKS2", "BALLER", "BALLER2",	"BJXL", "BANSHEE", "BFINJECTION", "BIFF", "BLAZER", "BLAZER2", "BLAZER3", "BISON", "BISON2",	"BISON3", "BOXVILLE", "BOXVILLE2", "BOXVILLE3", "BOBCATXL", "BODHI2", "BUCCANEER", "BUFFALO", "BUFFALO2", "BULLDOZER",	"BULLET", "BURRITO", "BURRITO2", "BURRITO3", "BURRITO4", "BURRITO5", "CAVALCADE", "CAVALCADE2", "POLICET",	"GBURRITO", "CABLECAR", "CADDY", "CADDY2", "CAMPER", "CARBONIZZARE", "CHEETAH", "COMET2", "COGCABRIO", "COQUETTE",	"CUTTER", "GRESLEY", "DILETTANTE", "DILETTANTE2", "DUNE", "DUNE2", "HOTKNIFE", "DLOADER", "DUBSTA", "DUBSTA2",	"DUMP", "RUBBLE", "DOCKTUG", "DOMINATOR", "EMPEROR", "EMPEROR2", "EMPEROR3", "ENTITYXF", "EXEMPLAR", "ELEGY2",	"F620", "FBI", "FBI2", "FELON", "FELON2", "FELTZER2", "FIRETRUK", "FLATBED", "FORKLIFT", "FQ2",	"FUSILADE", "FUGITIVE", "FUTO", "GRANGER", "GAUNTLET", "HABANERO", "HAULER", "HANDLER", "INFERNUS", "INGOT",	"INTRUDER", "ISSI2", "JACKAL", "JOURNEY", "JB700", "KHAMELION", "LANDSTALKER", "LGUARD", "MANANA", "MESA",	"MESA2", "MESA3", "CRUSADER", "MINIVAN", "MIXER", "MIXER2", "MONROE", "MOWER", "MULE", "MULE2",	"ORACLE", "ORACLE2", "PACKER", "PATRIOT", "PBUS", "PENUMBRA", "PEYOTE", "PHANTOM", "PHOENIX", "PICADOR",	"POUNDER", "POLICE", "POLICE4", "POLICE2", "POLICE3", "POLICEOLD1", "POLICEOLD2", "PONY", "PONY2", "PRAIRIE",	"PRANGER", "PREMIER", "PRIMO",  "RANCHERXL", "RANCHERXL2", "RAPIDGT", "RAPIDGT2", "RADI", "RATLOADER",	"REBEL", "REGINA", "REBEL2", "RENTALBUS", "RUINER", "RUMPO", "RUMPO2", "RHINO", "RIOT", "RIPLEY",	"ROCOTO", "ROMERO", "SABREGT", "SADLER", "SADLER2", "SANDKING", "SANDKING2", "SCHAFTER2", "SCHWARZER", "SCRAP",	"SEMINOLE", "SENTINEL", "SENTINEL2", "ZION", "ZION2", "SERRANO", "SHERIFF", "SHERIFF2", "SPEEDO", "SPEEDO2",	"STANIER", "STINGER", "STINGERGT", "STOCKADE", "STOCKADE3", "STRATUM", "SULTAN", "SUPERD", "SURANO", "SURFER",	"SURFER2", "SURGE", "TAILGATER", "TAXI", "TRASH", "TRACTOR", "TRACTOR2", "TRACTOR3", "TOWTRUCK",	"TOWTRUCK2","UTILLITRUCK", "UTILLITRUCK2", "UTILLITRUCK3"};float offset;Ped playerPed = PLAYER::PLAYER_PED_ID();        DWORD model = GAMEPLAY::GET_HASH_KEY((char *)vehicleModels[rand() % 188]);STREAMING::REQUEST_MODEL(model);while (!STREAMING::HAS_MODEL_LOADED(model)) WAIT(0);if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_A_VEHICLE(model)){    Vector3 dim1, dim2;    GAMEPLAY::GET_MODEL_DIMENSIONS(model, &dim1, &dim2);    offset = dim2.y * 1.6;}   Vector3 dir = ENTITY::GET_ENTITY_FORWARD_VECTOR(playerPed);Vector3 pos = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1);float rot = (ENTITY::GET_ENTITY_ROTATION(playerPed, 0)).z;Vehicle veh = VEHICLE::CREATE_VEHICLE(model, pos.x + (dir.x * offset) , pos.y + (dir.y * offset) , pos.z , rot, 1, 1);VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh);        VEHICLE::SET_VEHICLE_FORWARD_SPEED(veh, 70.0);   STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&veh);

I will try to shoot 3D in vehicle cannon v2 :lol:

 

Cool. will you show us the "3D" vehicle cannon v2 main code? :blush::santa:

Share this post


Link to post
Share on other sites
TuckerW2001

The reason the money drop code is making people freeze is because you didn't request the model to do so put this before create_ambient_pickup

 

 

static Any money = GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_MED_BAG");

STREAMING::REQUEST_MODEL(money)

 

 

this should stop freezing if not i have a money drop code ill look at it and just post it

Edited by TuckerW2001

Share this post


Link to post
Share on other sites
alloc8or

Why do I freeze when I enable it and then shoot

 

I think its because im looping it

 

So, this is a 100% working code made by me:

if (money_gun){	DWORD model = GET_HASH_KEY("prop_money_bag_01");	int PickupHash = GET_HASH_KEY("PICKUP_MONEY_CASE");	if (DOES_ENTITY_EXIST(PLAYER_PED_ID()))	{		if (IS_PED_SHOOTING(PLAYER_PED_ID()))		{			float tmp[6];			GET_PED_LAST_WEAPON_IMPACT_COORD(PLAYER_PED_ID(), (Vector3*)tmp);			if (tmp[0] != 0 || tmp[2] != 0 || tmp[4] != 0)			{				REQUEST_MODEL(model);				while (!HAS_MODEL_LOADED(model)) WAIT(0);				{					CREATE_AMBIENT_PICKUP(PickupHash, tmp[0], tmp[2], tmp[4], 0, 40000, model, FALSE, TRUE);					SET_MODEL_AS_NO_LONGER_NEEDED(model);				}			}		}	}}
Edited by Unknown_Modder

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.


  • 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.