Announcement

If you are having trouble logging in, please reset your password.
If you are not getting an activation email, please check your spam or
use the "Contact Us" to contact an admin.
July 31, 2012, 06:51:51 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
I'm using LUA commands to have melee weapons in game (freeride and story). I tried this, but it crashes almost always. What's wrong with my script?


 







Quoteif i==nil then i=0 end i=i+1

if i==5 then i=1 end




if i==1 then




game.game:GetActivePlayer():SetAnimStyle("melee","default")




game.game:GetActivePlayer():SetAnimStyle("common","default")




game.game:GetActivePlayer():ModelToHands(true,-1,1) end




if i==2 then




game.game:GetActivePlayer():SetAnimStyle("melee","PendrekStyle")




game.game:GetActivePlayer():SetAnimStyle("common","ManColdWeapon")




game.game:GetActivePlayer():ModelToHands(true,-1,28) end




if i= then




game.game:GetActivePlayer():SetAnimStyle("melee","BatStyle")




game.game:GetActivePlayer():SetAnimStyle("common","ManColdWeapon")




game.game:GetActivePlayer():ModelToHands(true,-1,32) end




if i==4 then




game.game:GetActivePlayer():SetAnimStyle("melee","KnifeStyle")




game.game:GetActivePlayer():SetAnimStyle("common","ManColdWeapon")




game.game:GetActivePlayer():ModelToHands(true,-1,22) end



 


 


 




P.S. I know about melee weapons in Existenz34's freeride, but I use a different one.

#1 August 01, 2012, 02:06:24 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
jaca37


 




it different styles ("melee","...") and ("common","...")




and else in game should stand modified file "ingame"







Quoteif i==nil then i=0 end

DelayBuffer:Insert(function(l_1_0)i=i+1 if i==5 then i=1 end




if i==1 then game.game:GetActivePlayer():ModelToHands(true,1,1)




game.game:GetActivePlayer():SetAnimStyle("melee","default")end




if i==2 then game.game:GetActivePlayer():ModelToHands(true,1,28)




game.game:GetActivePlayer():SetAnimStyle("melee","PendrekStyle")end




if i= then game.game:GetActivePlayer():ModelToHands(true,1,32)




game.game:GetActivePlayer():SetAnimStyle("melee","BatStyle")end




if i==4 then game.game:GetActivePlayer():ModelToHands(true,1,22)




game.game:GetActivePlayer():SetAnimStyle("melee","KnifeStyle")end




end,{l_1_0},100,1,false)



#2 August 01, 2012, 07:36:38 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Thanks, I already modified ingame file to have more melee styles.