Ricksta 0 Posted January 2, 2009 Share Posted January 2, 2009 yeah ive been trying all day here is my code PLAYER_ID, PLAYER_INDEX, PLAYER_CHAR, SAVEDONE, TIMER = 0function InitScript()-- blah-blah-blahWait(10000)endfunction WaitForPlayerPoolCreation()while (IsPlayerPoolCreated() == 0) do Wait(2000)endendfunction WaitForValidPlayer()PLAYER_CHAR = 0repeat 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 enduntil (PLAYER_CHAR > 0) endfunction start() PushInt(PLAYER_CHAR) PushInt(1) PushInt(65534) PushInt(1) PushInt(1) PushInt(1) PushInt(0) CallNative("SWITCH_PED_TO_RAGDOLL")Wait(30) PushInt(1) PushInt(79) CallNative("CREATE_NM_MESSAGE") PushInt(1) PushInt(95) CallNative("SET_NM_MESSAGE_BOOL") PushInt(85) PushInt(65535) CallNative("SET_NM_MESSAGE_INT") PushInt(PLAYER_CHAR) CallNative("SEND_NM_MESSAGE") PushInt(PLAYER_ID) PushInt(1) CallNative("GIVE_PLAYER_RAGDOLL_CONTROL")endfunction stop() PushInt(PLAYER_CHAR) CallNative("CLEAR_CHAR_TASKS") PushInt(0) PushInt(79) CallNative("CREATE_NM_MESSAGE") PushInt(PLAYER_CHAR) CallNative("SEND_NM_MESSAGE") PushInt(PLAYER_CHAR) PushInt(0) CallNative("SWITCH_PED_TO_ANIMATED") PushInt(PLAYER_CHAR) PushInt(PLAYER_ID) PushInt(0) CallNative("GIVE_PLAYER_RAGDOLL_CONTROL")Wait(100)endfunction main()InitScript()while true do WaitForPlayerPoolCreation() WaitForValidPlayer() if (IsKeyPressed(34) == 1) thenstart()Wait(300)end if (IsKeyPressed(33) == 1) thenstop()Wait(300)endWait(300)endend-- startmain(); press PGDN to ragdoll drunk press PGUP to get up it makes niko drunk balanced while ragdolled but it only works if player is idle (holding the phone before u press PGDN helps load anims maybe) -also notice that the function (switch to ped) returns a value, probably the is_ped_ragdoll. theres a pop after the line is called don't work for me crashes to desktop when i press pageup, All I have is the ragdoll lua in alice folder. Link to post Share on other sites
HippieCommunist 28 Posted January 2, 2009 Share Posted January 2, 2009 i dunno why but i think that Alice 0.1 cant deal with animations/models yet Link to post Share on other sites
GAK 0 Posted January 2, 2009 Share Posted January 2, 2009 (edited) I think SWITCH_PED_TO_RAGDOLL can work but it's crash too. I think we should wait Alice 0.2 maybe solve some problems or find why it's crash. PushInt(PLAYER_CHAR) CallNative("CLEAR_CHAR_TASKS") This could solve the crash, I will try. Edited January 2, 2009 by GAK Link to post Share on other sites
HippieCommunist 28 Posted January 2, 2009 Share Posted January 2, 2009 (edited) nah man spare it i tought it was because the AMBIENT_ANIMS so i blocked them and all the gestures and lookvise stuff aswell.... still crash on the native SWITCH PED to save u the time i tried the CLEAR TASK IMMEDIATLY aswell Edited January 2, 2009 by HippieCommunist Link to post Share on other sites
SaintJimmy 161 Posted January 2, 2009 Author Share Posted January 2, 2009 Come on scripters...BRAINSTORM! Link to post Share on other sites
HippieCommunist 28 Posted January 2, 2009 Share Posted January 2, 2009 (edited) thats what im saying... now look some idiot's gonna write his stupid off-topic request or find a brilliant reason why this is a-bad-idea-mod... where are the legends? even the creator of Alice dont have a clue, i pmed him. Edited January 2, 2009 by HippieCommunist Link to post Share on other sites
GAK 0 Posted January 2, 2009 Share Posted January 2, 2009 In playboy3.sco there's : SWITCH_PED_TO_RAGDOLL(L[950][var0 * 39].v0, 0, 60000, 1, 1, 1, 0) But this example also crash. Nobody remembers a mission where an NPC or the player switch to ragdoll? Link to post Share on other sites
pedrus 0 Posted January 2, 2009 Share Posted January 2, 2009 Hello, what are the parameters of the native "APPLY_FORCE_TO_PED" plz? The used_natives_params.txt say that there is 12 parameters!!! Link to post Share on other sites
HippieCommunist 28 Posted January 2, 2009 Share Posted January 2, 2009 yeah thats coz u need 3d direction of force (vector = 2 points+) and all the other flags... theres the climing the truck mission where niko has alot of RD action Link to post Share on other sites
GAK 0 Posted January 2, 2009 Share Posted January 2, 2009 I find an example of SWITCH_PED_TO_RAGDOLL_WITH_FALL : SWITCH_PED_TO_RAGDOLL_WITH_FALL(L[3405][14], 2200, 5000, 1, (float)1, -0.0f, 0.0f, 1.75f, (float)0, (float)0, (float)0, (float)0, (float)0, (float)0) I have not even tried, I'll keep you informed. Link to post Share on other sites
HippieCommunist 28 Posted January 2, 2009 Share Posted January 2, 2009 thats crap! nothing works! Link to post Share on other sites
sk8er_martz 0 Posted January 2, 2009 Share Posted January 2, 2009 (edited) Nobody remembers a mission where an NPC or the player switch to ragdoll? Going to the bar gets you drunk (euphoria's animated ragdoll) and then after a bit brings you back to normal so see if there's anything in activities. The latest script posted now worked for me ONCE, it crashes the rest of the time but when it worked it was perfect, I really like how you have to press a button to get up again so he doesn't do it automatically. If you guys have gotten that far then surely this will be done and dusted soon. Hopefully additional things could be done too like being able to jump while in the drunk state (not the crappy animation) and maybe even holding onto things like cars or buildings, that'll be awesome, but right now the current script is great, apart from the extremely low success rate. Keep up the good work! I've been hoping for this mod ever since I got drunk on the PS3 version and I didn't expect it to come this soon. Edited January 2, 2009 by sk8er_martz Link to post Share on other sites
HippieCommunist 28 Posted January 2, 2009 Share Posted January 2, 2009 another funny thing ive noticed that if you enter only 6 params (without the last 0) the success rate goes up alittle (littttle) something diffrent about how the PLAYER_CHAR is proccesed in the original DRUNK script, i even sent my latest script to Alexander Blade so fingers crossed, hope the problem is simple (since it does work scripwise). btw @sk8er_martz - my script has the get up function working great (PGUP) Link to post Share on other sites
pedrus 0 Posted January 3, 2009 Share Posted January 3, 2009 (edited) yeah thats coz u need 3d direction of force (vector = 2 points+) and all the other flags... theres the climing the truck mission where niko has alot of RD action Ok but where I can find an example ? because I don't know how the parameters (or flags) are organized. Edit: btw @sk8er_martz - my script has the get up function working great (PGUP) Where is it? I need it!!! Edited January 3, 2009 by pedrus Link to post Share on other sites
ManiaChris 0 Posted January 3, 2009 Share Posted January 3, 2009 yeah ive been trying all day here is my code PLAYER_ID, PLAYER_INDEX, PLAYER_CHAR, SAVEDONE, TIMER = 0function InitScript()-- blah-blah-blahWait(10000)endfunction WaitForPlayerPoolCreation()while (IsPlayerPoolCreated() == 0) do Wait(2000)endendfunction WaitForValidPlayer()PLAYER_CHAR = 0repeat 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 enduntil (PLAYER_CHAR > 0) endfunction start() PushInt(PLAYER_CHAR) PushInt(1) PushInt(65534) PushInt(1) PushInt(1) PushInt(1) PushInt(0) CallNative("SWITCH_PED_TO_RAGDOLL")Wait(30) PushInt(1) PushInt(79) CallNative("CREATE_NM_MESSAGE") PushInt(1) PushInt(95) CallNative("SET_NM_MESSAGE_BOOL") PushInt(85) PushInt(65535) CallNative("SET_NM_MESSAGE_INT") PushInt(PLAYER_CHAR) CallNative("SEND_NM_MESSAGE") PushInt(PLAYER_ID) PushInt(1) CallNative("GIVE_PLAYER_RAGDOLL_CONTROL")endfunction stop() PushInt(PLAYER_CHAR) CallNative("CLEAR_CHAR_TASKS") PushInt(0) PushInt(79) CallNative("CREATE_NM_MESSAGE") PushInt(PLAYER_CHAR) CallNative("SEND_NM_MESSAGE") PushInt(PLAYER_CHAR) PushInt(0) CallNative("SWITCH_PED_TO_ANIMATED") PushInt(PLAYER_CHAR) PushInt(PLAYER_ID) PushInt(0) CallNative("GIVE_PLAYER_RAGDOLL_CONTROL")Wait(100)endfunction main()InitScript()while true do WaitForPlayerPoolCreation() WaitForValidPlayer() if (IsKeyPressed(34) == 1) thenstart()Wait(300)end if (IsKeyPressed(33) == 1) thenstop()Wait(300)endWait(300)endend-- startmain(); press PGDN to ragdoll drunk press PGUP to get up it makes niko drunk balanced while ragdolled but it only works if player is idle (holding the phone before u press PGDN helps load anims maybe) -also notice that the function (switch to ped) returns a value, probably the is_ped_ragdoll. theres a pop after the line is called Doesn't work for me too - crash! Link to post Share on other sites
HippieCommunist 28 Posted January 3, 2009 Share Posted January 3, 2009 O RLY!? lol Link to post Share on other sites
pedrus 0 Posted January 3, 2009 Share Posted January 3, 2009 If you replace "PushInt(PLAYER_ID)" by "PushInt(PLAYER_INDEX)" PgDwn works (Niko is drunk but never get up) and PgUp crash. Link to post Share on other sites
sk8er_martz 0 Posted January 3, 2009 Share Posted January 3, 2009 If you replace "PushInt(PLAYER_ID)" by "PushInt(PLAYER_INDEX)" PgDwn works (Niko is drunk but never get up) and PgUp crash. Which "PushInt(PLAYER_ID)" ? I replaced all of them but it crashed like usual when I pressed PgDown. If you can get that to work all the time and the normal script has PgUp working all the time, couldn't you remove the other button from each of the scripts and run them seperately? Link to post Share on other sites
pedrus 0 Posted January 3, 2009 Share Posted January 3, 2009 There is two "PushInt(PLAYER_ID)". I replaced both and it worked (only PgDwn) something like 3 times but now it crash when I press PgDwn... . PgUp always crashed my game. Link to post Share on other sites
HippieCommunist 28 Posted January 3, 2009 Share Posted January 3, 2009 yeah it makes no sense the buggy line is SWITHC_PED_TO_RAGDOLL not the one with the ID... Link to post Share on other sites
pedrus 0 Posted January 3, 2009 Share Posted January 3, 2009 (edited) How do you see where are errors? Sry for stupid questions but I'm really interested in making lua script for GTA. I want to know all I need to know about lua and natives etc... Edited January 3, 2009 by pedrus Link to post Share on other sites
HippieCommunist 28 Posted January 4, 2009 Share Posted January 4, 2009 ok guys we got an update almost positive confirmation about the function (SWITCH_PED) not bein' called propertly yet, the good news is that Alice 0.2 is on the way and its gonna support specific functions like such in case any of u are still trying.... just sit tight (animated for now ^^) Link to post Share on other sites
LiFe161 0 Posted January 5, 2009 Share Posted January 5, 2009 here in my video I touched a car and the cops shoot at me and there is Ragdoll enabeld link http://de.youtube.com/watch?v=WYcIQKVBls0&...re=channel_page on 1:59 to 2:20 That is exactly as if you have a person and shoot them Ragdoll is enabeld Link to post Share on other sites
HippieCommunist 28 Posted January 5, 2009 Share Posted January 5, 2009 so what your idea? spawn two cars to crush niko real fast and disappear? ^_^ Link to post Share on other sites
lasallup 0 Posted January 5, 2009 Share Posted January 5, 2009 no way to assign the "got shot" action to a key so when you press it you get shot and go into ragdoll? Link to post Share on other sites
HippieCommunist 28 Posted January 5, 2009 Share Posted January 5, 2009 perhaps only if ure being shot by a water stream... so no damage would be taken Link to post Share on other sites
sk8er_martz 0 Posted January 6, 2009 Share Posted January 6, 2009 perhaps only if ure being shot by a water stream... so no damage would be taken Perhaps spawn an invisible water stream from the camera's point of view aiming at the player Although it'd be easier to just trigger whatever happens when someone is hit by a water stream from a fire truck or whatever, which I'm assuming is what the latest script tries anyway. Link to post Share on other sites
HippieCommunist 28 Posted January 6, 2009 Share Posted January 6, 2009 maybe with the C++ thinggy the switch ped to ragdoll wont crash? i dont know what to do with the source tough, its not just saving as DLL in notepad Link to post Share on other sites
sjaak327 1,044 Posted January 6, 2009 Share Posted January 6, 2009 maybe with the C++ thinggy the switch ped to ragdoll wont crash? i dont know what to do with the source tough, its not just saving as DLL in notepad You need to compile the source with VS 2008 Link to post Share on other sites
HippieCommunist 28 Posted January 6, 2009 Share Posted January 6, 2009 well... i understand how ppl rush releases with gta but isnt that somn' the author should do? Link to post Share on other sites