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.
June 03, 2012, 06:40:00 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Could anybody write a script for me, in which I could switch through multiple models using just one key?




I'm using this cript for single model:


 







QuoteDelayBuffer:Insert(function(l_1_0)CommandBuffer:Insert(l_6_0,{function(l_1_0)game.game:ChangePlayerModel("cpoli3")end})end,{l_1_0},100,1,false)

 




I'd be very grateful  " data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/smile@2x.png 2x" width="20" height="20">

#1 June 03, 2012, 08:36:01 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hi, it is this.




You can change the player model anytime, anywhere.




100% working.


 


 


 




<div class="ipsSpoiler_header">



ply=game.game:GetActivePlayer()




if i==nil then i=0 end i=i+1 if i==13+1 then i=1 end




DelayBuffer:Insert(function(l_1_0)if i==1 then game.game:ChangePlayerModel("vitarmy")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==2 then game.game:ChangePlayerModel("vitksl2")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i= then game.game:ChangePlayerModel("vitnah_t")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==4 then game.game:ChangePlayerModel("vitoveral")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==5 then game.game:ChangePlayerModel("vitspo")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==6 then game.game:ChangePlayerModel("vittel")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==7 then game.game:ChangePlayerModel("vitukl")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==8 then game.game:ChangePlayerModel("vitvez")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==9 then game.game:ChangePlayerModel("vitvop")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==10 then game.game:ChangePlayerModel("vitvov")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==11 then game.game:ChangePlayerModel("vitvov2i")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==12 then game.game:ChangePlayerModel("vitvov3")end end,{l_1_0},250,1,false)




</div>

 

#2 June 03, 2012, 12:47:06 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
jaca37




DelayBuffer:Insert & CommandBuffer:Insert for one commande is not necessary.


 




in FR Script for change player model this is sufficient.







Quotegame.game:ChangePlayerModel("Name_model")

 




But the game crashes when using injector with direct control of this type.




that's why we use a delay.







QuoteDelayBuffer:Insert(function(l_1_0) xxxxx
 end,{l_1_0},250
,1
,false)

xxxxx
 = your command

250
 = delay (millisecond) before activation of the command




1
 = number of times to repeat the fonction


 




Test to understand the function "DelayBuffer":







QuoteDelayBuffer:Insert(function(l_1_0)game.game:SaveGame(1) end,{l_1_0},10000
,10
,false)
a backup is performed every 10
 second (10000 milli) for10
 times. 




So in the end, we have.







QuoteDelayBuffer:Insert(function(l_1_0)game.game:ChangePlayerModel("Name_model")end,{l_1_0},250,1,false)

 




and for "x" choices.







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

DelayBuffer:Insert(function(l_1_0)if i==1 then game.game:ChangePlayerModel("Name_model")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i==2 then game.game:ChangePlayerModel("Name_model")end end,{l_1_0},250,1,false)




DelayBuffer:Insert(function(l_1_0)if i= .......







don't write x+1
 but if you have 5 model, write 6.

#3 June 03, 2012, 03:53:55 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Thank you eXistenZ34.




You are more experienced than me.




I'm just learning.

#4 June 03, 2012, 04:10:16 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Thank both of you guys. Especially Existenz for this small tutorial  <img src="/wp-content/uploads/invision_emoticons/wink.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/wink@2x.png 2x" width="20" height="20">