KayLaJay15 Posted November 8, 2017 Share Posted November 8, 2017 (edited) When I use Skinselector with Madleg ragdoll physics in GTA SA it works great, the only problem I have is that when I die I don't spawn at the nearest hospital I spawn in the same place I died. I believe if I change the way the wasted code is programmed I can make it so after the screen fades out for a second the player when the ragdoll physics is activated changes into the default death animation so the game recognises that it needs to spawn me to the nearest hospital. Is there a way to program the game to do this? Edited November 9, 2017 by KayLaJay15 Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 9, 2017 Author Share Posted November 9, 2017 Or is it possible to change a ped skin back to CJ when you die? Link to comment Share on other sites More sharing options...
deltaCJ Posted November 14, 2017 Share Posted November 14, 2017 I don't know if this is what you want but, idk if this is the rag doll mod, because I've never heard of this happening and never happened to me. Could you try to remove one mod, then remove the other, and then remove both? Check to see which mod is affecting the game. If it's neither than you might have done something with out knowing. Link to comment Share on other sites More sharing options...
GuruGuru Posted November 14, 2017 Share Posted November 14, 2017 (edited) I don't know if this is what you want but, idk if this is the rag doll mod, because I've never heard of this happening and never happened to me. Could you try to remove one mod, then remove the other, and then remove both? Check to see which mod is affecting the game. If it's neither than you might have done something with out knowing. Nah is a problem with ragdoll itself,even madleg confirmed it. I did a quick but sh*tty workaround.Is not very realiable since madleg's plugin modifies chars coordinates each frame. SCRIPT_STARTNOP// TERMINATE_THIS_CUSTOM_SCRIPT{ LVAR_INT scplayer LVAR_FLOAT x y z z_angle GET_PLAYER_CHAR 0 scplayer main: WHILE IS_PC_VERSION WAIT 0 IF IS_CHAR_DEAD scplayer GET_CHAR_COORDINATES scplayer x y z WHILE IS_CHAR_DEAD scplayer WAIT 0 ENDWHILE WAIT 5000 // CLEO_CALL get_nearest_hospital_xyz 0 (x,y,z) (x,y,z,z_angle) SET_CHAR_COORDINATES_NO_OFFSET scplayer 2027.77 -1420.52 15.99 // LS Hospital near the bike park ENDIF ENDWHILE}{ //not including this in the main cuz is not tested get_nearest_hospital_xyz: LVAR_FLOAT x y z LVAR_FLOAT dA dB shortest_distance LVAR_INT town_number restart_point_number GET_AREA_VISIBLE town_number SWITCH town_number CASE 0 GET_DISTANCE_BETWEEN_COORDS_3D (x, y, z) (2027.77, -1420.52, 15.99) dA GET_DISTANCE_BETWEEN_COORDS_3D (x, y, z) (1180.85 -1325.57 12.58) db IF dA < dB shortest_distance = dA ELSE shortest_distance = dB restart_point_number = 1 ENDIF BREAK CASE 1 GET_DISTANCE_BETWEEN_COORDS_3D (x, y, z) (2027.77, -1420.52, 15.99) dA GET_DISTANCE_BETWEEN_COORDS_3D (x, y, z) (1244.437, 331.2261, 18.5547) db GOSUB which_is_lesser IF dA < dB shortest_distance = dA ELSE shortest_distance = dB restart_point_number = 1 ENDIF BREAK ENDSWITCH CLEO_RETURN 0 which_is_lesser: }SCRIPT_END// restart points// 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 // 016C: restart_if_wasted_at 1180.85 -1325.57 12.58 angle 271.4 town_number 0 // 016C: restart_if_wasted_at 1244.437 331.2261 18.5547 angle 7.5465 town_number 1 // 016C: restart_if_wasted_at -2199.719 -2308.075 29.6181 angle 322.8928 town_number 1 // 016C: restart_if_wasted_at -2670.285 616.4364 13.4531 angle 183.1042 town_number 1 // 016C: restart_if_wasted_at -316.3832 1056.045 18.7344 angle 1.6017 town_number 2 // 016C: restart_if_wasted_at -1514.823 2527.119 54.7443 angle 2.3546 town_number 2 // 016C: restart_if_wasted_at 1578.446 1770.682 9.8358 angle 99.7567 town_number 2 // 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 // 016D: restart_if_busted_at 632.2344 -571.7104 15.3515 angle 267.2 town_number 1 // 016D: restart_if_busted_at -1605.792 716.8598 11.0241 angle 355.2978 town_number 1 // 016D: restart_if_busted_at -2163.829 -2387.817 29.625 angle 134.2066 town_number 1 // 016D: restart_if_busted_at -212.1889 979.4168 18.3219 angle 278.0478 town_number 2 // 016D: restart_if_busted_at -1393.072 2633.116 54.9491 angle 86.0424 town_number 2 // 016D: restart_if_busted_at 2337.083 2453.802 13.9765 angle 90.7643 town_number 2 Edited November 14, 2017 by guru_guru Link to comment Share on other sites More sharing options...
GuruGuru Posted November 14, 2017 Share Posted November 14, 2017 Lulz,actually I can "fix" it. script_name("RG Mod ded FIx")function main() while true do wait(0) if isCharDead(PLAYER_PED) then while not isCharPlayingAnim(PLAYER_PED,"getup") and not isCharPlayingAnim(PLAYER_PED,"getup_front") do wait(0) end setCharCoordinates(PLAYER_PED,2027.77, -1420.52, 15.99) end endend I'll finish this soontm deltaCJ and KayLaJay15 2 Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 14, 2017 Author Share Posted November 14, 2017 Lulz,actually I can "fix" it. script_name("RG Mod ded FIx")function main() while true do wait(0) if isCharDead(PLAYER_PED) then while not isCharPlayingAnim(PLAYER_PED,"getup") and not isCharPlayingAnim(PLAYER_PED,"getup_front") do wait(0) end setCharCoordinates(PLAYER_PED,2027.77, -1420.52, 15.99) end endend I'll finish this soontm Thank you I appreciate this. Link to comment Share on other sites More sharing options...
madleg Posted November 14, 2017 Share Posted November 14, 2017 Lulz,actually I can "fix" it.... thats kinda interesting, that this worked for you. I mean that problem, actually it wasnt conceived to be used on player at all, occurs because that after death theres no task "get up" or "get up and stand still" being applied to ped, so it keeps ragdolling until one of this task will be applied or ped will be destroyed. This is the only way to stop specific ped's ragdoll. Well, this is just theory, i dont know actually what happens, so good luck guys . Link to comment Share on other sites More sharing options...
GuruGuru Posted November 20, 2017 Share Posted November 20, 2017 oops,I completely forgot about this >>Install MoonLoader,create a new text file called "whatever.lua",paste this code there and save the file to /moonloader script_name("RG Mod ded FIx")wasted_restart_point = { LS1 = { x = 2027.77, y = -1420.52, z = 15.99, angle = 137.0 }, LS2 = { x = 1180.85, y = -1325.57, z = 12.58 , angle = 271.4 }, SF1 = { x = 1244.437, y = 331.2261, z = 18.5547, angle = 7.5465 }, SF2 = { x = -2199.719, y = -2308.075, z = 29.6181, angle = 322.8928 }, SF3 = { x = -2670.285, y = 616.4364, z = 13.4531, angle = 183.1042 }, LV1 = { x = -316.3832, y = 1056.045, z = 18.7344, angle = 1.6017 }, LV2 = { x = -1514.823, y = 2527.119, z = 54.74431 , angle = 2.3546 }, LV3 = { x = 1578.446, y = 1770.682, z = 9.8358 , angle = 99.7567 }}function main() while true do wait(0) if isCharDead(PLAYER_PED) then while not isCharPlayingAnim(PLAYER_PED,"getup") and not isCharPlayingAnim(PLAYER_PED,"getup_front") do wait(0) end local x,y,z,angle = getClosestHospital() setCharCoordinates(PLAYER_PED,x,y,z) setCharHeading(PLAYER_PED, angle) end endendfunction getClosestHospital() local x,y,z = getCharCoordinates(PLAYER_PED) local minimal_distance, key,point, closest_point minimal_distance = 6000.0 for key,point in pairs(wasted_restart_point) do local distance = getDistanceBetweenCoords3d(point.x,point.y,point.z,x,y,z) if distance <= minimal_distance then minimal_distance = distance closest_point = point end end return closest_point.x, closest_point.y, closest_point.z, closest_point.angleend As I said before,this is not a fix but a workaround,and a really bad one. I tried to stop the ragdolling by forcing the player to play "getup" , "getup_front" and others anims,but it didn't do sh*t. I guess madleg's mod is too strong lol. This means that you'll remain in the same place until the ragdolling stops by itself.So if you get stuck on the ground,bad luck,you'll have to restart the game. Also, thats kinda interesting, that this worked for you. I mean that problem, actually it wasnt conceived to be used on player at all, occurs because that after death theres no task "get up" or "get up and stand still" being applied to ped, so it keeps ragdolling until one of this task will be applied or ped will be destroyed. This is the only way to stop specific ped's ragdoll. Well, this is just theory, i dont know actually what happens, so good luck guys . thanks for info! It didn't help much but thanks anyways Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 20, 2017 Author Share Posted November 20, 2017 Thank you anyway I appreciate the help, I tired it and yeah it didn't work. Link to comment Share on other sites More sharing options...
madleg Posted November 20, 2017 Share Posted November 20, 2017 @guru_guru, just like i said its about task, not animation, character repositioning etc. Some cleo example to set getupandstandstill task from my very first experiments 0A96: [email protected] = actor $PLAYER_ACTOR struct [email protected] += 1148 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 [email protected] += 4 // CTaskManager* 0AA7: call_function 0x0061A5A0 num_params 0 pop 0 [email protected] // CTaskpool_allocate 0AA8: call_function_method 0x00678130 struct [email protected] num_params 0 pop 0 [email protected] // int CTask_GetUpAndStandStill_constructor (this, int?) 0AA6: call_method 0x00681AF0 struct [email protected] num_params 3 pop 0 1 0 [email protected] // void CTaskManager_setTask (this, Ctask*, int index ?, bool?) Link to comment Share on other sites More sharing options...
skatefilter5 Posted November 20, 2017 Share Posted November 20, 2017 In fact, I want to get rid of programmed wasted and busted, like if i use emulate_player_busted_or_wasted while the text shows, it will disable player_char, which i can access any cleo mods even I can't paused the game because it most likely screwed so i have to restart the game, any how to remove the programmed script? so I can manual customize after I'm died or busted, like samp multiplayer instead of that fade in. Link to comment Share on other sites More sharing options...