Jump to content

About file.cs


Mohamed Boubekri

Recommended Posts

Mohamed Boubekri

Hey everyone, i'm new here and i want to learn how to make a .cs file for san andreas.

i have make a script here:

{$CLEO .cs}

 script_name 'TEST'
 
:TEST_11
wait 0
if                                                                                                                            
  Player.Defined($PLAYER_CHAR)
goto_if_false @TEST_11
if and
  is_key_pressed 9
  is_key_pressed 49
goto_if_false @TEST_11 
goto @TEST_14

:TEST_14
wait 0
if 
  04EE:   animation "ATTRACTORS" loaded
then   
goto @TEST_15
else 
goto @TEST_13
end

:TEST_13   
 04ED: load_animation  "ATTRACTORS"
 set_player_enter_car_button $PLAYER_CHAR can_enter_exit_vehicles 0
 task_play_anim $PLAYER_ACTOR perform_animation "STEPSIT_IN" IFP "ATTRACTORS" framedelta 2.0 loop 0 lockX 0 lockY 0 lockF 1 time -1
 
goto @TEST_11

:TEST_15

task_play_anim $PLAYER_ACTOR perform_animation "STEPSIT_OUT" IFP "ATTRACTORS" framedelta 2.0 loop 0 lockX 0 lockY 0 lockF 0 time -1
wait 100
04EF: release_animation "ATTRACTORS"
set_player_enter_car_button $PLAYER_CHAR can_enter_exit_vehicles 1

goto @TEST_11

When i press 'tab + 1', the animation 'stepsit out' start, and when i press again 'tab + 1', again anim 'stepsit out' start :p

The idea is i want from console when i click 'tab + 1' set first anim 'stepsit in', and when i click again 'tab + 1' set the second anim 'stepsit out'

I want to know where is the fault, so i can learn, also if there any advices i would be very appreciated, thanks.

Edited by Mohamed Boubekri
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.