Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

Wasted Error


KayLaJay15
 Share

Recommended Posts

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 by KayLaJay15
Link to comment
Share on other sites

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

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 by guru_guru
Link to comment
Share on other sites

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

  • Like 2
Link to comment
Share on other sites

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

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

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

@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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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