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. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    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 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 Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA 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

Sign in to follow this  
SaintJimmy

[Q] Togglable Ragdoll Mode

Recommended Posts

HippieCommunist

well... i understand how ppl rush releases with gta

but isnt that somn' the author should do?

Share this post


Link to post
Share on other sites
Intosia
well... i understand how ppl rush releases with gta

but isnt that somn' the author should do?

What? Compile? No, its a hook, so you need to add your own code. So without sourcecode its useless biggrin.gif

Share this post


Link to post
Share on other sites
GAK

I will try in a few days to use the C++ hook to enable the Ragdoll. So we'll have to wait unless someone else knows the C++ and can do it before me?

Share this post


Link to post
Share on other sites
HippieCommunist

gimmie G gimmie A gimmie K

 

goooooooooo GAK! lol.gif

icon14.gificon14.gificon14.gif

Share this post


Link to post
Share on other sites
Demonith

This will be nice icon14.gificon14.gificon14.gificon14.gif

Share this post


Link to post
Share on other sites
Demonith

Share this post


Link to post
Share on other sites
SaintJimmy
moto_whistle.gif

what exactly did you intend by making this post?

there already is enough useless spam here.

excellent work on the progress, modders.

Share this post


Link to post
Share on other sites
Scortch

Hey biggrin.gif Im new here, and i have never ever coded anything if thats what it's called xD

 

But i saw this on, side... 4 i think :

PLAYER_ID, PLAYER_INDEX, PLAYER_CHAR, SAVEDONE, TIMER = 0

 

function InitScript()

-- blah-blah-blah

Wait(10000)

end

 

function WaitForPlayerPoolCreation()

while (IsPlayerPoolCreated() == 0) do

Wait(2000)

end

end

 

function WaitForValidPlayer()

PLAYER_CHAR = 0

repeat

CallNative("GET_PLAYER_ID")

PLAYER_ID = GetIntResult()

if (PLAYER_ID >= 0) then

PushInt(PLAYER_ID)

CallNative("CONVERT_INT_TO_PLAYERINDEX")

PLAYER_INDEX = GetIntResult()

PushInt(PLAYER_INDEX)

PushVarPtr()

CallNative("GET_PLAYER_CHAR")

PLAYER_CHAR = GetIntParam(1)

if (PLAYER_CHAR <= 0) then

Wait(1000)

end

end

until (PLAYER_CHAR > 0)

end

 

function main()

InitScript()

while true do

if (IsKeyPressed(35) == 1) then

WaitForPlayerPoolCreation()

if (IsKeyPressed(35) == 1) then

WaitForValidPlayer()

PushInt(PLAYER_CHAR)

CallNative("START_CHAR_FIRE")

Wait(20)

PushInt(PLAYER_CHAR)

CallNative("EXTINGUISH_CHAR_FIRE")

end

end

Wait(300)

end

end

 

-- start

main();

 

And i have heard frome some1 that this can do the trick, i just wonder where to put it?tounge.gif

Share this post


Link to post
Share on other sites
LiFe161

when you have alice ... go to the lua folder and create a *.lua file where you add this code

Share this post


Link to post
Share on other sites
L0uNGeR

I don't know how to go back to normal, I think it has something to do with SWITCH_PED_TO_ANIMATED.

I also don't know if it works on Niko.

 

 

function IsPedRagdoll(ped)       --** IS_PED_RAGDOLL       --** Params:1  Return:True       PushInt(ped)                                          -- 0:  (int)   Target ped       CallNative("IS_PED_RAGDOLL")                          -------------- NATIVE CALL       return GetIntResult()                                 ------ (int)   Is ped a ragdoll? 1/0 yes/noendfunction RagdollPed(ped)       if IsPedRagdoll(ped) == 0 then               --** CLEAR_CHAR_TASKS_IMMEDIATELY               --** Params:1  Return:False               PushInt(ped)                                  -- 0:  (int)   Target char               CallNative("CLEAR_CHAR_TASKS_IMMEDIATELY")    -------------- NATIVE call               --** SWITCH_PED_TO_RAGDOLL               --** Params:7  Return:True               PushInt(ped)                                  -- 0:  (int)   Target ped               PushInt(20000)                                -- 1:  (int)   ???               PushInt(30000)                                -- 2:  (int)   ???               PushInt(0)                                    -- 3:  (int)   ???               PushInt(0)                                    -- 4:  (int)   ???               PushInt(0)                                    -- 5:  (int)   ???               PushInt(0)                                    -- 6:  (int)   ???               CallNative("SWITCH_PED_TO_RAGDOLL")           -------------- NATIVE call       endend

 

 

Oh and don't try to run it on a char that is already a ragdoll, it will crash.

Have fun.

Share this post


Link to post
Share on other sites
Scortch
when you have alice ... go to the lua folder and create a *.lua file where you add this code

I have the alice folder, and iguess the lua thing is the file inside the alice map? And, after i have opened the alice folder, what do u then wan't me 2 do next? smile.gif

Share this post


Link to post
Share on other sites
Scortch
I don't know how to go back to normal, I think it has something to do with SWITCH_PED_TO_ANIMATED.

I also don't know if it works on Niko.

 

 

function IsPedRagdoll(ped)       --** IS_PED_RAGDOLL       --** Params:1  Return:True       PushInt(ped)                                          -- 0:  (int)   Target ped       CallNative("IS_PED_RAGDOLL")                          -------------- NATIVE CALL       return GetIntResult()                                 ------ (int)   Is ped a ragdoll? 1/0 yes/noendfunction RagdollPed(ped)       if IsPedRagdoll(ped) == 0 then               --** CLEAR_CHAR_TASKS_IMMEDIATELY               --** Params:1  Return:False               PushInt(ped)                                  -- 0:  (int)   Target char               CallNative("CLEAR_CHAR_TASKS_IMMEDIATELY")    -------------- NATIVE call               --** SWITCH_PED_TO_RAGDOLL               --** Params:7  Return:True               PushInt(ped)                                  -- 0:  (int)   Target ped               PushInt(20000)                                -- 1:  (int)   ???               PushInt(30000)                                -- 2:  (int)   ???               PushInt(0)                                    -- 3:  (int)   ???               PushInt(0)                                    -- 4:  (int)   ???               PushInt(0)                                    -- 5:  (int)   ???               PushInt(0)                                    -- 6:  (int)   ???               CallNative("SWITCH_PED_TO_RAGDOLL")           -------------- NATIVE call       endend

 

 

Oh and don't try to run it on a char that is already a ragdoll, it will crash.

Have fun.

I don'r really know what i have to do with these codes?

 

I tryed open the alice folder, and then i opened the "PUT YOUR ALICE LUA SCRIPTS HERE" and droped the code in there, startet the game and pressed end and page up and page down, nottin' happend... Is it me who are doin' sommin wrong? smile.gif

Share this post


Link to post
Share on other sites
HippieCommunist
I don't know how to go back to normal, I think it has something to do with SWITCH_PED_TO_ANIMATED.

I also don't know if it works on Niko.

 

 

 same as always

 

 

Oh and don't try to run it on a char that is already a ragdoll, it will crash.

Have fun.

this dosnt work on niko - CONFIRMED

Share this post


Link to post
Share on other sites
Demonith

Keep up guys god work icon14.gif

Share this post


Link to post
Share on other sites
HippieCommunist

have another possitive confirmation that its STABLE with the C++ hook!! lets hope some saint moto_whistle.gif upload a rdy .ASI

Share this post


Link to post
Share on other sites
HippieCommunist

another amusing thing:

 

 

function IsPedRagdoll(ped)      --** IS_PED_RAGDOLL      --** Params:1  Return:True      PushInt(ped)                                          -- 0:  (int)   Target ped      CallNative("IS_PED_RAGDOLL")                          -------------- NATIVE CALL      return GetIntResult()                                 ------ (int)   Is ped a ragdoll? 1/0 yes/noend

 

 

 

Oh and don't try to run it on a char that is already a ragdoll, it will crash.

Have fun.

 

why?

Share this post


Link to post
Share on other sites
L0uNGeR

That is amusing actually.

I meant to say that you shouldn't use SWITCH_PED_TO_RAGDOLL on a ragdoll, cause it will crash.

This comment doesn't apply to my RagdollPed() function.

Share this post


Link to post
Share on other sites
HippieCommunist

MY MOD

 

reply guys plz

Share this post


Link to post
Share on other sites
HippieCommunist

 

[Q] Togglable Ragdoll Mode (Pages 1 2 3 ...6 )

I think it would be ... easy?

 

6 pages, YOU tell me... biggrin.gif

Share this post


Link to post
Share on other sites
iristrauma

 

That is amusing actually.

I meant to say that you shouldn't use SWITCH_PED_TO_RAGDOLL on a ragdoll, cause it will crash.

This comment doesn't apply to my RagdollPed() function.

How did you do that ped smashing dude..? Looks fun..

 

HippieCommunist

 

Can you make a version with bindable keys or is it possible to change it to something we prefer..?

Share this post


Link to post
Share on other sites
Intosia
That is amusing actually.

I meant to say that you shouldn't use SWITCH_PED_TO_RAGDOLL on a ragdoll, cause it will crash.

This comment doesn't apply to my RagdollPed() function.

How did you do that ped smashing dude..? Looks fun..

 

HippieCommunist

 

Can you make a version with bindable keys or is it possible to change it to something we prefer..?

 

if ((GetAsyncKeyState(VK_F5) & 1) != 0){ bEnabled = !bEnabled;}if ((bEnabled) ||  ((GetAsyncKeyState(VK_F6) & 1) != 0) ){  Char c; Car car; u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId()); GetPlayerChar(playerIndex, &c); f32 x,y,z; GetCharCoordinates(c, &x, &y, &z); car = GetClosestCar(x, y, z, 10.0, false, 60);   ApplyForceToCar(car, 3, 30.0, -20.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1);}

 

 

in C++ for Hook, happy now? catspider.gif

Share this post


Link to post
Share on other sites
iristrauma
That is amusing actually.

I meant to say that you shouldn't use SWITCH_PED_TO_RAGDOLL on a ragdoll, cause it will crash.

This comment doesn't apply to my RagdollPed() function.

How did you do that ped smashing dude..? Looks fun..

 

HippieCommunist

 

Can you make a version with bindable keys or is it possible to change it to something we prefer..?

 

if ((GetAsyncKeyState(VK_F5) & 1) != 0){ bEnabled = !bEnabled;}if ((bEnabled) ||  ((GetAsyncKeyState(VK_F6) & 1) != 0) ){  Char c; Car car; u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId()); GetPlayerChar(playerIndex, &c); f32 x,y,z; GetCharCoordinates(c, &x, &y, &z); car = GetClosestCar(x, y, z, 10.0, false, 60);   ApplyForceToCar(car, 3, 30.0, -20.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1);}

 

 

in C++ for Hook, happy now? catspider.gif

Sorry dude, that means nothing to me. I have zero knowledge of asi & c++ and hook etc.. sad.gifconfused.gif

Share this post


Link to post
Share on other sites
L0uNGeR

If you have the C++ hook up and running, you add this to "CustomThread::RunTick()"

 

 

bool bEnabled;if ((GetAsyncKeyState(VK_F5) & 1) != 0){bEnabled = !bEnabled;}if ((bEnabled) ||  ((GetAsyncKeyState(VK_F6) & 1) != 0) ){Char c;Car car;u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId());GetPlayerChar(playerIndex, &c);f32 x,y,z;GetCharCoordinates(c, &x, &y, &z);car = GetClosestCar(x, y, z, 10.0, false, 60);  ApplyForceToCar(car, 3, 30.0, -20.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1);}

 

Share this post


Link to post
Share on other sites
Intosia
That is amusing actually.

I meant to say that you shouldn't use SWITCH_PED_TO_RAGDOLL on a ragdoll, cause it will crash.

This comment doesn't apply to my RagdollPed() function.

How did you do that ped smashing dude..? Looks fun..

 

HippieCommunist

 

Can you make a version with bindable keys or is it possible to change it to something we prefer..?

 

if ((GetAsyncKeyState(VK_F5) & 1) != 0){ bEnabled = !bEnabled;}if ((bEnabled) ||  ((GetAsyncKeyState(VK_F6) & 1) != 0) ){  Char c; Car car; u32 playerIndex = ConvertIntToPlayerIndex(GetPlayerId()); GetPlayerChar(playerIndex, &c); f32 x,y,z; GetCharCoordinates(c, &x, &y, &z); car = GetClosestCar(x, y, z, 10.0, false, 60);   ApplyForceToCar(car, 3, 30.0, -20.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1);}

 

 

in C++ for Hook, happy now? catspider.gif

Sorry dude, that means nothing to me. I have zero knowledge of asi & c++ and hook etc.. sad.gifconfused.gif

Then look in the ASI Topic on page 38 or 37, theres is Loungers LUA version of this,

Share this post


Link to post
Share on other sites
L0uNGeR

I have just managed to create a function for ragdoll niko (on/off toggle), I'll create a video tomorrow. biggrin.gif

Share this post


Link to post
Share on other sites
Killuminati91
I have just managed to create a function for ragdoll niko (on/off toggle), I'll create a video tomorrow. biggrin.gif

its already out wink.gif

Share this post


Link to post
Share on other sites
aceship

i Didnt see it, but i just done the ragdoll

Share this post


Link to post
Share on other sites
L0uNGeR

Ya it's quite easy and I'm pretty sure I tried the same code on LUA but never worked, it's works with the C++ hook though.

When I toggle the Ragdoll off, he just stands up straight in an instant, anyone know how to prevent this?

Share this post


Link to post
Share on other sites
HippieCommunist

 

Ya it's quite easy and I'm pretty sure I tried the same code on LUA but never worked, it's works with the C++ hook though.

When I toggle the Ragdoll off, he just stands up straight in an instant, anyone know how to prevent this?

yeah, when calling the SwithPedToRagdoll func, set the last 4 flags to '0'

 

 

SwithPedToRagdoll(player, 10000, 10000, 0, 0, 0, 0)

 

 

like that

Share this post


Link to post
Share on other sites
L0uNGeR

Thnx, you happen to know what all the params do?

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.

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.

Sign in to follow this  

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