thpsX

- => Questions & Tutorials => Topic started by: Brownfloor on August 15, 2021, 05:55:29 pm

Title: How do you check for walk_speed using a function/command parser? (THUG PRO)
Post by: Brownfloor on August 15, 2021, 05:55:29 pm
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!
Title: Re: How do you check for walk_speed using a function/command parser? (THUG PRO)
Post by: Brownfloor on August 15, 2021, 07:41:54 pm
nvm i figured it out