xsploit Posted April 26, 2015 Share Posted April 26, 2015 THANKS FOR THIS. going to try convert this ped = clone_ped(player_ped_id()); int group = get_player_group(player_id()); set_ped_as_group_member(ped, group); task_combat_hated_targets_around_ped(0, 1000.0f, 0); give_delayed_weapon_to_ped(ped, Hash("weapon_pistol")); set_ped_keep_task(ped, true); Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 (edited) Can someone help guide me in the right direction? I'm using http://www.dev-c.com/nativedb/as a reference, but I'm having some trouble. How do I determine what arguments each reference is looking for? void EXPLODE_VEHICLE(Any p0, Any p1, Any p2) // 0xBEDEACEB is what I'm trying to use, but I have no clue what p0, p1, and p2 are. Once it's called it does tell me I need all 3 and a boolean though. Edited April 26, 2015 by Swarm96 noahvt 1 Link to comment Share on other sites More sharing options...
xsploit Posted April 26, 2015 Share Posted April 26, 2015 (edited) i'm just tinkering but i'm will get the bodyguard script Edited April 26, 2015 by xsploit Link to comment Share on other sites More sharing options...
Aardvark2015 Posted April 26, 2015 Share Posted April 26, 2015 Before you butcher your code to get it smaller, try setting the compiler to optimize for size. Also, it's a 3MB plugin for a 60GB game, who cares Link to comment Share on other sites More sharing options...
Aleph-Zero Posted April 26, 2015 Share Posted April 26, 2015 Can someone help guide me in the right direction? I'm using http://www.dev-c.com/nativedb/as a reference, but I'm having some trouble. How do I determine what arguments each reference is looking for? void EXPLODE_VEHICLE(Any p0, Any p1, Any p2) // 0xBEDEACEB is what I'm trying to use, but I have no clue what p0, p1, and p2 are. Once it's called it does tell me I need all 3 and a boolean though. p0 is the vehicle, p1 and p2 are probably two booleans. try VEHICLE::EXPLODE_VEHICLE(veh, 1, 0); Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 Can someone help guide me in the right direction? I'm using http://www.dev-c.com/nativedb/as a reference, but I'm having some trouble. How do I determine what arguments each reference is looking for? void EXPLODE_VEHICLE(Any p0, Any p1, Any p2) // 0xBEDEACEB is what I'm trying to use, but I have no clue what p0, p1, and p2 are. Once it's called it does tell me I need all 3 and a boolean though. p0 is the vehicle, p1 and p2 are probably two booleans. try VEHICLE::EXPLODE_VEHICLE(veh, 1, 0); Awesome, figured it out earlier and yes this is correct. THANKS FOR THIS. going to try convert this ped = clone_ped(player_ped_id()); int group = get_player_group(player_id()); set_ped_as_group_member(ped, group); task_combat_hated_targets_around_ped(0, 1000.0f, 0); give_delayed_weapon_to_ped(ped, Hash("weapon_pistol")); set_ped_keep_task(ped, true); Was trying to get this to work & got this far: local ped = PED.CLONE_PED(PLAYER.PLAYER_PED_ID(), false, false, true) local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()) PED.SET_PED_AS_GROUP_MEMBER(1, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(0,1000,0) WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PED, Hash("weapon_pistol")) I'm not really sure where to go with that last line. Anyone have ideas? Link to comment Share on other sites More sharing options...
Aardvark2015 Posted April 26, 2015 Share Posted April 26, 2015 While exploring the graphics and UI drawing functions with this - no reloading required - I noticed that anything I draw flickers on and off. I can think of two reasons why this would be happening, 1) the script function is taking too long to execute, and gets out of sync with the game 2) the main tick() function is already called out of sync of the game's frames/ticks I figured maybe reloading the testmodule.lua every tick could be too slow, but even putting the drawing code in the main tick instead of the reloading doesn't help. Link to comment Share on other sites More sharing options...
xsploit Posted April 26, 2015 Share Posted April 26, 2015 Can someone help guide me in the right direction? I'm using http://www.dev-c.com/nativedb/as a reference, but I'm having some trouble. How do I determine what arguments each reference is looking for? void EXPLODE_VEHICLE(Any p0, Any p1, Any p2) // 0xBEDEACEB is what I'm trying to use, but I have no clue what p0, p1, and p2 are. Once it's called it does tell me I need all 3 and a boolean though. p0 is the vehicle, p1 and p2 are probably two booleans. try VEHICLE::EXPLODE_VEHICLE(veh, 1, 0); Awesome, figured it out earlier and yes this is correct. THANKS FOR THIS. going to try convert this ped = clone_ped(player_ped_id()); int group = get_player_group(player_id()); set_ped_as_group_member(ped, group); task_combat_hated_targets_around_ped(0, 1000.0f, 0); give_delayed_weapon_to_ped(ped, Hash("weapon_pistol")); set_ped_keep_task(ped, true); Was trying to get this to work & got this far: local ped = PED.CLONE_PED(PLAYER.PLAYER_PED_ID(), false, false, true) local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()) PED.SET_PED_AS_GROUP_MEMBER(1, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(0,1000,0) WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PED, Hash("weapon_pistol")) I'm not really sure where to go with that last line. Anyone have ideas? No not yet lol, loads a bunch of franklins Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 Can someone help guide me in the right direction? I'm using http://www.dev-c.com/nativedb/as a reference, but I'm having some trouble. How do I determine what arguments each reference is looking for? void EXPLODE_VEHICLE(Any p0, Any p1, Any p2) // 0xBEDEACEB is what I'm trying to use, but I have no clue what p0, p1, and p2 are. Once it's called it does tell me I need all 3 and a boolean though. p0 is the vehicle, p1 and p2 are probably two booleans. try VEHICLE::EXPLODE_VEHICLE(veh, 1, 0); Awesome, figured it out earlier and yes this is correct. THANKS FOR THIS. going to try convert this ped = clone_ped(player_ped_id()); int group = get_player_group(player_id()); set_ped_as_group_member(ped, group); task_combat_hated_targets_around_ped(0, 1000.0f, 0); give_delayed_weapon_to_ped(ped, Hash("weapon_pistol")); set_ped_keep_task(ped, true); Was trying to get this to work & got this far: local ped = PED.CLONE_PED(PLAYER.PLAYER_PED_ID(), false, false, true) local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()) PED.SET_PED_AS_GROUP_MEMBER(1, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(0,1000,0) WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PED, Hash("weapon_pistol")) I'm not really sure where to go with that last line. Anyone have ideas? No not yet lol, loads a bunch of franklins Same here. No clue why. Link to comment Share on other sites More sharing options...
xsploit Posted April 26, 2015 Share Posted April 26, 2015 (edited) switch (activeLineIndexWeapon){case 0:for (int i = 0; i < sizeof(weaponNames) / sizeof(weaponNames[0]); i++)WEAPON::GIVE_DELAYED_WEAPON_TO_PED(playerPed, GAMEPLAY::GET_HASH_KEY((char *)weaponNames[i]), 1000, 0);set_status_text("all weapon added");break;// switchable featuresdefault:if (lines[activeLineIndexWeapon].pState)*lines[activeLineIndexWeapon].pState = !(*lines[activeLineIndexWeapon].pState);if (lines[activeLineIndexWeapon].pUpdated)*lines[activeLineIndexWeapon].pUpdated = true; static LPCSTR weaponNames[] = { "WEAPON_KNIFE", "WEAPON_NIGHTSTICK", "WEAPON_HAMMER", "WEAPON_BAT", "WEAPON_GOLFCLUB", "WEAPON_CROWBAR", "WEAPON_PISTOL", "WEAPON_COMBATPISTOL", "WEAPON_APPISTOL", "WEAPON_PISTOL50", "WEAPON_MICROSMG", "WEAPON_SMG", "WEAPON_ASSAULTSMG", "WEAPON_ASSAULTRIFLE", "WEAPON_CARBINERIFLE", "WEAPON_ADVANCEDRIFLE", "WEAPON_MG", "WEAPON_COMBATMG", "WEAPON_PUMPSHOTGUN", "WEAPON_SAWNOFFSHOTGUN", "WEAPON_ASSAULTSHOTGUN", "WEAPON_BULLPUPSHOTGUN", "WEAPON_STUNGUN", "WEAPON_SNIPERRIFLE", "WEAPON_HEAVYSNIPER", "WEAPON_GRENADELAUNCHER", "WEAPON_GRENADELAUNCHER_SMOKE", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_GRENADE", "WEAPON_STICKYBOMB", "WEAPON_SMOKEGRENADE", "WEAPON_BZGAS", "WEAPON_MOLOTOV", "WEAPON_FIREEXTINGUISHER", "WEAPON_PETROLCAN", "WEAPON_SNSPISTOL", "WEAPON_SPECIALCARBINE", "WEAPON_HEAVYPISTOL", "WEAPON_BULLPUPRIFLE", "WEAPON_HOMINGLAUNCHER", "WEAPON_PROXMINE", "WEAPON_SNOWBALL", "WEAPON_VINTAGEPISTOL", "WEAPON_DAGGER", "WEAPON_FIREWORK", "WEAPON_MUSKET", "WEAPON_MARKSMANRIFLE", "WEAPON_HEAVYSHOTGUN", "WEAPON_GUSENBERG", "WEAPON_HATCHET", "WEAPON_RAILGUN" in the trainer there is a table list http://lua-users.org/wiki/TablesTutorial Edited April 26, 2015 by xsploit Link to comment Share on other sites More sharing options...
DakotaCSS Posted April 26, 2015 Share Posted April 26, 2015 (edited) Was trying to get this to work & got this far: local ped = PED.CLONE_PED(PLAYER.PLAYER_PED_ID(), false, false, true) local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()) PED.SET_PED_AS_GROUP_MEMBER(1, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(0,1000,0) WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PED, Hash("weapon_pistol")) I'm not really sure where to go with that last line. Anyone have ideas? The give weapon needs 2 extra arguments not sure what they are but it works fine here: local playerPed = PLAYER.PLAYER_PED_ID(); local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CLONE_PED(playerPed, coords.x, coords.y, coords.z); local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()); PED.SET_PED_AS_GROUP_MEMBER(clone, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(clone, 5000, 0); PED.SET_PED_KEEP_TASK(clone, true); WEAPON.GIVE_DELAYED_WEAPON_TO_PED(clone, GAMEPLAY.GET_HASH_KEY("weapon_pistol"), 1000, true); ENTITY.SET_ENTITY_INVINCIBLE(clone, false); Edited April 26, 2015 by DakotaCSS Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 Was trying to get this to work & got this far: local ped = PED.CLONE_PED(PLAYER.PLAYER_PED_ID(), false, false, true) local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()) PED.SET_PED_AS_GROUP_MEMBER(1, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(0,1000,0) WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PED, Hash("weapon_pistol")) I'm not really sure where to go with that last line. Anyone have ideas? The give weapon needs 2 extra arguments not sure what they are but it works fine here: local playerPed = PLAYER.PLAYER_PED_ID(); local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CLONE_PED(playerPed, coords.x, coords.y, coords.z); local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()); PED.SET_PED_AS_GROUP_MEMBER(clone, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(clone, 5000, 0); PED.SET_PED_KEEP_TASK(clone, true); WEAPON.GIVE_DELAYED_WEAPON_TO_PED(clone, GAMEPLAY.GET_HASH_KEY("weapon_pistol"), 1000, true); ENTITY.SET_ENTITY_INVINCIBLE(clone, false); Awesome dude. Any way to make the clones not of your character haha? Link to comment Share on other sites More sharing options...
xsploit Posted April 26, 2015 Share Posted April 26, 2015 tick: scripts/testmodule.lua:17: error in function 'GIVE_DELAYED_WEAPON_TO_PED'. argument #1 is 'table'; 'number' expected. tick: scripts/testmodule.lua:17: error in function 'GIVE_DELAYED_WEAPON_TO_PED'. argument #1 is 'table'; 'number' expected. THATS THE ERROR I GET Link to comment Share on other sites More sharing options...
headscript Posted April 26, 2015 Author Share Posted April 26, 2015 While exploring the graphics and UI drawing functions with this - no reloading required - I noticed that anything I draw flickers on and off. I can think of two reasons why this would be happening, 1) the script function is taking too long to execute, and gets out of sync with the game 2) the main tick() function is already called out of sync of the game's frames/ticks I figured maybe reloading the testmodule.lua every tick could be too slow, but even putting the drawing code in the main tick instead of the reloading doesn't help. tick is only called every 50ms to not lower the game fps but i can try to set it to 0 which i havent tried but the native trainer uses tick: scripts/testmodule.lua:17: error in function 'GIVE_DELAYED_WEAPON_TO_PED'. argument #1 is 'table'; 'number' expected.tick: scripts/testmodule.lua:17: error in function 'GIVE_DELAYED_WEAPON_TO_PED'. argument #1 is 'table'; 'number' expected.THATS THE ERROR I GET Show me your exact line you trying to do Was trying to get this to work & got this far: local ped = PED.CLONE_PED(PLAYER.PLAYER_PED_ID(), false, false, true) local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()) PED.SET_PED_AS_GROUP_MEMBER(1, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(0,1000,0) WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PED, Hash("weapon_pistol")) I'm not really sure where to go with that last line. Anyone have ideas? The give weapon needs 2 extra arguments not sure what they are but it works fine here: local playerPed = PLAYER.PLAYER_PED_ID(); local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CLONE_PED(playerPed, coords.x, coords.y, coords.z); local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()); PED.SET_PED_AS_GROUP_MEMBER(clone, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(clone, 5000, 0); PED.SET_PED_KEEP_TASK(clone, true); WEAPON.GIVE_DELAYED_WEAPON_TO_PED(clone, GAMEPLAY.GET_HASH_KEY("weapon_pistol"), 1000, true); ENTITY.SET_ENTITY_INVINCIBLE(clone, false); Awesome dude. Any way to make the clones not of your character haha? PED.CREATE_RANDOM_PED( Position.x, Position.y, Position.z) Can someone help guide me in the right direction? I'm using http://www.dev-c.com/nativedb/as a reference, but I'm having some trouble. How do I determine what arguments each reference is looking for? void EXPLODE_VEHICLE(Any p0, Any p1, Any p2) // 0xBEDEACEB is what I'm trying to use, but I have no clue what p0, p1, and p2 are. Once it's called it does tell me I need all 3 and a boolean though. someohow the natives.h which was released in the sdk is different to the nativedb (both are not right so i dont know which i should use right now i still stick to the sdk ones) Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 While exploring the graphics and UI drawing functions with this - no reloading required - I noticed that anything I draw flickers on and off. I can think of two reasons why this would be happening, 1) the script function is taking too long to execute, and gets out of sync with the game 2) the main tick() function is already called out of sync of the game's frames/ticks I figured maybe reloading the testmodule.lua every tick could be too slow, but even putting the drawing code in the main tick instead of the reloading doesn't help. tick is only called every 50ms to not lower the game fps but i can try to set it to 0 which i havent tried but the native trainer uses tick: scripts/testmodule.lua:17: error in function 'GIVE_DELAYED_WEAPON_TO_PED'. argument #1 is 'table'; 'number' expected.tick: scripts/testmodule.lua:17: error in function 'GIVE_DELAYED_WEAPON_TO_PED'. argument #1 is 'table'; 'number' expected.THATS THE ERROR I GET Show me your exact line you trying to do Was trying to get this to work & got this far: local ped = PED.CLONE_PED(PLAYER.PLAYER_PED_ID(), false, false, true) local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()) PED.SET_PED_AS_GROUP_MEMBER(1, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(0,1000,0) WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PED, Hash("weapon_pistol")) I'm not really sure where to go with that last line. Anyone have ideas? The give weapon needs 2 extra arguments not sure what they are but it works fine here: local playerPed = PLAYER.PLAYER_PED_ID(); local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CLONE_PED(playerPed, coords.x, coords.y, coords.z); local group = PLAYER.GET_PLAYER_GROUP(PLAYER.PLAYER_ID()); PED.SET_PED_AS_GROUP_MEMBER(clone, group); AI.TASK_COMBAT_HATED_TARGETS_AROUND_PED(clone, 5000, 0); PED.SET_PED_KEEP_TASK(clone, true); WEAPON.GIVE_DELAYED_WEAPON_TO_PED(clone, GAMEPLAY.GET_HASH_KEY("weapon_pistol"), 1000, true); ENTITY.SET_ENTITY_INVINCIBLE(clone, false); Awesome dude. Any way to make the clones not of your character haha? PED.CREATE_RANDOM_PED( Position.x, Position.y, Position.z) Can someone help guide me in the right direction? I'm using http://www.dev-c.com/nativedb/as a reference, but I'm having some trouble. How do I determine what arguments each reference is looking for? void EXPLODE_VEHICLE(Any p0, Any p1, Any p2) // 0xBEDEACEB is what I'm trying to use, but I have no clue what p0, p1, and p2 are. Once it's called it does tell me I need all 3 and a boolean though. someohow the natives.h which was released in the sdk is different to the nativedb (both are not right so i dont know which i should use right now i still stick to the sdk ones) local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CREATE_RANDOM_PED(coords.x, coords.y, coords.z); Should work, no? It just tells me that when I call coords in the second line, they aren't numbers. Link to comment Share on other sites More sharing options...
headscript Posted April 26, 2015 Author Share Posted April 26, 2015 (edited) local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CREATE_RANDOM_PED(coords.x, coords.y, coords.z); Should work, no? It just tells me that when I call coords in the second line, they aren't numbers. update your plugin i forgot to add vector support in this version sorry Edited April 26, 2015 by headscript Link to comment Share on other sites More sharing options...
XBLToothPik Posted April 26, 2015 Share Posted April 26, 2015 While exploring the graphics and UI drawing functions with this - no reloading required - I noticed that anything I draw flickers on and off. I can think of two reasons why this would be happening, 1) the script function is taking too long to execute, and gets out of sync with the game 2) the main tick() function is already called out of sync of the game's frames/ticks I figured maybe reloading the testmodule.lua every tick could be too slow, but even putting the drawing code in the main tick instead of the reloading doesn't help. tick is only called every 50ms to not lower the game fps but i can try to set it to 0 which i havent tried but the native trainer uses I don't think bringing it down to 0 ms would make it lag any, the script hook is all threaded just as the game is, should run just fine. Also, on the side of a 3+MB .ASI file, did you set the target of the VS project to RELEASE? DEBUG outputs are much larger. Link to comment Share on other sites More sharing options...
headscript Posted April 26, 2015 Author Share Posted April 26, 2015 I don't think bringing it down to 0 ms would make it lag any, the script hook is all threaded just as the game is, should run just fine. Also, on the side of a 3+MB .ASI file, did you set the target of the VS project to RELEASE? DEBUG outputs are much larger. http://puu.sh/hraRy/7faf20798f.png http://puu.sh/hraSc/1a88907c9f.png http://puu.sh/hraSK/c74a8208c2.png Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CREATE_RANDOM_PED(coords.x, coords.y, coords.z); Should work, no? It just tells me that when I call coords in the second line, they aren't numbers. update your plugin i forgot to add vector support in this version sorry I still get an error. It says: tick: scripts/testmodule.lua:12: error in function 'CREATE_RANDOM_PED'. argument #1 is 'Vector3'; 'number' expected. Any ideas? Is my code wrong? Link to comment Share on other sites More sharing options...
xsploit Posted April 26, 2015 Share Posted April 26, 2015 Ok, It's working now if i can just spawn peds with the zombie model Link to comment Share on other sites More sharing options...
headscript Posted April 26, 2015 Author Share Posted April 26, 2015 local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0); local clone = PED.CREATE_RANDOM_PED(coords.x, coords.y, coords.z); Should work, no? It just tells me that when I call coords in the second line, they aren't numbers. update your plugin i forgot to add vector support in this version sorry I still get an error. It says: tick: scripts/testmodule.lua:12: error in function 'CREATE_RANDOM_PED'. argument #1 is 'Vector3'; 'number' expected. Any ideas? Is my code wrong? tick: scripts/testmodule.lua:12: error in function 'CREATE_RANDOM_PED'. argument #1 is 'Vector3'; 'number' expected. u got to input vector.x vector.y vector.z Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 (edited) So, no clue why but it just decided to work. http://i.imgur.com/ihLoznG.jpg! Hahah! here is the full code for anyone who's interested: http://pastebin.com/w5DbK2uq Just press F3 to spawn them! Edited April 26, 2015 by Swarm96 Link to comment Share on other sites More sharing options...
headscript Posted April 26, 2015 Author Share Posted April 26, 2015 So, no clue why but it just decided to work. http://i.imgur.com/ihLoznG.jpg! Hahah! here is the full code for anyone who's interested: http://pastebin.com/w5DbK2uq Just press F3 to spawn them! if you want to spawn zombies http://puu.sh/hrbZW/8a8761a2c1.png local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") PED.CREATE_PED( 26,zombieSkinID,x, y, z,0,true,true) mis009 1 Link to comment Share on other sites More sharing options...
Swarm96 Posted April 26, 2015 Share Posted April 26, 2015 So, no clue why but it just decided to work. http://i.imgur.com/ihLoznG.jpg! Hahah! here is the full code for anyone who's interested: http://pastebin.com/w5DbK2uq Just press F3 to spawn them! if you want to spawn zombies http://puu.sh/hrbZW/8a8761a2c1.png local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") PED.CREATE_PED( 26,zombieSkinID,x, y, z,0,true,true) Could you explain a little bit whats happening in this line? I'm not sure I understand it: local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") How would I go about spawning other specific characters? Link to comment Share on other sites More sharing options...
xsploit Posted April 26, 2015 Share Posted April 26, 2015 (edited) So, no clue why but it just decided to work. http://i.imgur.com/ihLoznG.jpg! Hahah! here is the full code for anyone who's interested: http://pastebin.com/w5DbK2uq Just press F3 to spawn them! if you want to spawn zombies http://puu.sh/hrbZW/8a8761a2c1.png local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") PED.CREATE_PED( 26,zombieSkinID,x, y, z,0,true,true) can you post the whole code i can't get create ped to work on anything i did however got the clone to work.. But if i can createped, then i already set clones as cops, they look like franklin but can kill you. so if i just set the zombies to cops and they have no weapons. can sorta make a zombieish mof Edited April 26, 2015 by xsploit Link to comment Share on other sites More sharing options...
headscript Posted April 26, 2015 Author Share Posted April 26, 2015 So, no clue why but it just decided to work. http://i.imgur.com/ihLoznG.jpg! Hahah! here is the full code for anyone who's interested: http://pastebin.com/w5DbK2uq Just press F3 to spawn them! if you want to spawn zombies http://puu.sh/hrbZW/8a8761a2c1.png local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") PED.CREATE_PED( 26,zombieSkinID,x, y, z,0,true,true) can you post the whole code i can't get create ped to work on anything i did however got the clone to work local testmodule = {}testmodule.loaded = falsefunction testmodule.tick() if(not testmodule.loaded) then local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") local playerPed = PLAYER.PLAYER_PED_ID() local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed) local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0) while(not STREAMING.HAS_MODEL_LOADED(zombieSkinID)) do --wait(5) wait function not yet implemented in released version end for i = 0 ,10,1 do PED.CREATE_PED( 26,zombieSkinID,playerPosition.x, playerPosition.y, playerPosition.z,0,true,true) end STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(zombieSkinID) testmodule.loaded = true end --print("Hello World! 2") endreturn testmodule Link to comment Share on other sites More sharing options...
XBLToothPik Posted April 26, 2015 Share Posted April 26, 2015 I don't think bringing it down to 0 ms would make it lag any, the script hook is all threaded just as the game is, should run just fine. Also, on the side of a 3+MB .ASI file, did you set the target of the VS project to RELEASE? DEBUG outputs are much larger. http://puu.sh/hraRy/7faf20798f.png http://puu.sh/hraSc/1a88907c9f.png http://puu.sh/hraSK/c74a8208c2.png I mean up at the top of the window. Here: http://puu.sh/hrcx5/f103ff5154.png Link to comment Share on other sites More sharing options...
headscript Posted April 26, 2015 Author Share Posted April 26, 2015 (edited) I mean up at the top of the window. Here: http://puu.sh/hrcx5/f103ff5154.png x64 release ofc Edited April 26, 2015 by headscript Link to comment Share on other sites More sharing options...
antd Posted April 26, 2015 Share Posted April 26, 2015 Would it be possible for you to add a Lua console to this mod, so you don't need to restart the game and wait for it to load every time you want to try something new? dont u see a console when u join a game? you cant type anything in but if error occurs u see them there and u can reload your own lua files easily with lua builtin functions Thanks for this tool, headscript. Could you please explain briefly how to reload the lua files in-game? Link to comment Share on other sites More sharing options...
xsploit Posted April 26, 2015 Share Posted April 26, 2015 So, no clue why but it just decided to work. http://i.imgur.com/ihLoznG.jpg! Hahah! here is the full code for anyone who's interested: http://pastebin.com/w5DbK2uq Just press F3 to spawn them! if you want to spawn zombies http://puu.sh/hrbZW/8a8761a2c1.png local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") PED.CREATE_PED( 26,zombieSkinID,x, y, z,0,true,true) can you post the whole code i can't get create ped to work on anything i did however got the clone to work local testmodule = {}testmodule.loaded = falsefunction testmodule.tick() if(not testmodule.loaded) then local zombieSkinID = GAMEPLAY.GET_HASH_KEY("u_m_y_zombie_01") local playerPed = PLAYER.PLAYER_PED_ID() local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed) local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0) while(not STREAMING.HAS_MODEL_LOADED(zombieSkinID)) do --wait(5) wait function not yet implemented in released version end for i = 0 ,10,1 do PED.CREATE_PED( 26,zombieSkinID,playerPosition.x, playerPosition.y, playerPosition.z,0,true,true) end STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(zombieSkinID) testmodule.loaded = true end --print("Hello World! 2") endreturn testmodule I keep getting this tick: scripts/testmodule.lua:11: error in function 'CREATE_PED'. argument #3 is 'nil'; 'number' expected. Link to comment 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