When I am hosting a server, and use this function to call a vehicle model and refresh my model online, and then afterward set my physics to the vehicle that the correlates with the model, it works beautifully.
When I do it on a server i am NOT hosting, I crash. I have no idea why, does anyone have any idea as to why this may make me crash? I want this to work extremely bad as it would be something that I could be proud of as I haven't seen anyone do this in their mod before.
Anyway, here is the function.
Code: Select all
:i function $Vehicle_Model_Create$
:i $GetCurrentSkaterProfileIndex$
:i $EditPlayerAppearance$:s{
:i $profile$ = %GLOBAL%$currentSkaterProfileIndex$
:i $target$ = $SetPart$
$targetParams$ = :s{$part$ = $deck_graphic$$desc_id$ = %GLOBAL%$Vehicle_Name$:s}
:i :s}
:i call $RefreshSkaterModel$ arguments
$profile$ = %GLOBAL%$currentSkaterProfileIndex$$skater$ = %i(0,00000000)
:i endfunction
The function is pretty straightforward, which is why I can't figure out why it makes me crash. Thankyou.