Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Brownfloor

Pages: 1
1
Questions & Tutorials / How do I use $SetArrayElement$ (THUG PRO)
« on: August 16, 2021, 09:58:36 pm »
How do I use $SetArrayElement$ to edit data inside the example array's located below?

Example #1:
Code: [Select]
:i $testArray$ = :s{
:i $gamer$ = %i(1,00000001)
:i $gamer2$ = %i(2,00000002)
:i :s}

Example #2:
Code: [Select]
:i $testArray$ = :a{
:i :s{
:i $gamer$ = %i(1,00000001)
:i $gamer2$ = %i(2,00000002)
:i :s}
:i :a}

Code: [Select]
:i $testArray$ = :a{%i(1,00000001);%i(2,00000002):a}

2
So I've been trying to check for the walkspeed using command parser and so far I had either crashes or the else option (I specified) shows. Am I doing something wrong?

The walk_speed parameter is inside the file located at qb\game\skater\physics.qb.

Code: [Select]
:i function $test_function_thing$
:i if ($walk_parameters$)
:i $that_testing_thing$ = ( ($walk_parameters$ :a{%i(1,00000001):a} ) ->$walk_speed$)
:i if ($that_testing_thing$ = %i(150,00000096))
:i $create_net_panel_message$$text$ = %s(30,"150 SPEED!")$style$ = $net_team_panel_message$
:i else
:i $create_net_panel_message$$text$ = %s(30,"NOT 150 SPEED!")$style$ = $net_team_panel_message$
:i endif
:i endif
:i endfunction

I also tried...

Code: [Select]
:i function $test_function_thing$
:i if ($walk_parameters$)
$that_testing_thing$ = ( $walk_parameters$:a{%i(1,00000001):a} )
:i if ($that_testing_thing$ = %i(150,00000096))
:i $create_net_panel_message$$text$ = %s(30,"150 SPEED!")$style$ = $net_team_panel_message$
:i else
:i $create_net_panel_message$$text$ = %s(30,"NOT 150 SPEED")$style$ = $net_team_panel_message$
:i endif
:i endif
:i endfunction

Both shows "NOT 150 SPEED" when I know that this incorrect because the default is 150.

I also tried changing :a to :s because walk_parameters equals :s{ and not :a{
And when doing so this crashes the game.

So, I'm not sure what I'm doing wrong or what I need to do in order to fix it.
If anyone can help me it would be greatly appreciated!

Pages: 1