Reck1501 Posted May 6, 2015 Share Posted May 6, 2015 How do you replace bullets with objects or vehicles? Such as when you shoot, it shoots a dildo instead of the bullet model (lel) Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/ Share on other sites More sharing options...
FixingG00D Posted May 7, 2015 Share Posted May 7, 2015 I hope someone figures this one out. Has great potential as a mod. Someones done a vehicle canon mod already. Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067430838 Share on other sites More sharing options...
flocraftMods Posted May 7, 2015 Share Posted May 7, 2015 I made the vehicle cannon but it just shoot with vehicles additionally Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067431236 Share on other sites More sharing options...
alloc8or Posted May 7, 2015 Share Posted May 7, 2015 Simply use Endeavour.asi or do you want to make your own mod? Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067431383 Share on other sites More sharing options...
Reck1501 Posted May 7, 2015 Author Share Posted May 7, 2015 (edited) 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? Edited May 7, 2015 by Reck1501 Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067431425 Share on other sites More sharing options...
flocraftMods Posted May 7, 2015 Share Posted May 7, 2015 (edited) I set a car in front of the player and set the speed very fast Edited May 7, 2015 by flocraftMods Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067432411 Share on other sites More sharing options...
Marqurs Posted May 8, 2015 Share Posted May 8, 2015 (edited) hopefully we get source Edited May 8, 2015 by Marqurs Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067434397 Share on other sites More sharing options...
flocraftMods Posted May 8, 2015 Share Posted May 8, 2015 (edited) 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 Edited May 8, 2015 by flocraftMods flynhigh09 1 Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067434891 Share on other sites More sharing options...
Reck1501 Posted May 8, 2015 Author Share Posted May 8, 2015 (edited) 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 Oh cool! Thanks for the source mate! Also looking forward to version 2 Edited May 8, 2015 by Reck1501 Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067434919 Share on other sites More sharing options...
flocraftMods Posted May 8, 2015 Share Posted May 8, 2015 I just linked it with the shooting buttons and the time between the cars is needed to load the models Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067434973 Share on other sites More sharing options...
Reck1501 Posted May 8, 2015 Author Share Posted May 8, 2015 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 But linking it with the shooting buttons is kind of.. unnecessary. It's better to use IS_PED_SHOOTING Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067435014 Share on other sites More sharing options...
Rooster Mods Posted May 9, 2015 Share Posted May 9, 2015 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 Do u know how to make a car spawn? Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067438733 Share on other sites More sharing options...
alloc8or Posted May 11, 2015 Share Posted May 11, 2015 (edited) This is from the Native Trainer (Don't know if it's the full code ) Correct me if it's wrong! 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 May 11, 2015 by Unknown_Modder Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067448070 Share on other sites More sharing options...
FreeOffset Posted May 11, 2015 Share Posted May 11, 2015 (edited) 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 May 11, 2015 by FreeOffset Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067448459 Share on other sites More sharing options...
Rooster Mods Posted May 12, 2015 Share Posted May 12, 2015 (edited) 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 May 12, 2015 by Rooster Mods Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067453225 Share on other sites More sharing options...
FreeOffset Posted May 12, 2015 Share Posted May 12, 2015 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) Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067453839 Share on other sites More sharing options...
Rooster Mods Posted May 12, 2015 Share Posted May 12, 2015 (edited) 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 May 12, 2015 by Rooster Mods Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067453901 Share on other sites More sharing options...
FreeOffset Posted May 13, 2015 Share Posted May 13, 2015 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. Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067461637 Share on other sites More sharing options...
holyswordman Posted June 3, 2015 Share Posted June 3, 2015 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 Cool. will you show us the "3D" vehicle cannon v2 main code? Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067545193 Share on other sites More sharing options...
TuckerW2001 Posted July 23, 2015 Share Posted July 23, 2015 (edited) 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 July 23, 2015 by TuckerW2001 Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067785479 Share on other sites More sharing options...
alloc8or Posted August 28, 2015 Share Posted August 28, 2015 (edited) 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 August 29, 2015 by Unknown_Modder Link to comment https://gtaforums.com/topic/792378-replace-bullets-with-objectsvehicles/#findComment-1067926941 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now