Quantcast

Jump to content

» «
Photo

Steed mod

6 replies to this topic
Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#1

Posted 05 May 2012 - 11:23 AM Edited by Joni2030, 05 May 2012 - 11:27 AM.

I have little problem with my steed mod i want it´s stay at quad too and not only in bikes here is the code
CODE
{$CLEO .cs]
//-------------Steed---------------
03A4: name_thread 'Steed'

:Steed_10
wait 0 ms
model.Load( #QUAD)
0248:   model #QUAD available
jf @Steed_11

:Steed_11
0001: wait 0 ms
00D6: if and
0256:   player $PLAYER_CHAR defined
047A:   actor $PLAYER_ACTOR driving_bike
047A:   actor $PLAYER_ACTOR driving_bike #QUAD  
004D: jump_if_false @Steed_61
08C6: set_actor $PLAYER_ACTOR stay_on_bike 1
0001: wait 10 ms
0002: jump @Steed_11
0002: jump @Steed_68

:Steed_61
0002: jump @Steed_10

:Steed_68 // Note: a jump to this label will crash the game


????

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#2

Posted 05 May 2012 - 11:45 AM

You've posted this script before, and we have said this before, remove the second jump. It might also be better to check if the player is not driving the quad, after you used 08C6 (there is no need to loop that opcode).

Have you tested the script with that opcode? Because I don't think that the game treats quads as a new class of vehicles.

Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#3

Posted 05 May 2012 - 11:47 AM

I removed all of quad i only do it with bikes and this scripts works great

Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#4

Posted 05 May 2012 - 11:50 AM

Now i only release my mod

Jack...
  • Jack...

    Firearms and adrenaline!!!

  • Members
  • Joined: 06 Dec 2011
  • None

#5

Posted 05 May 2012 - 11:51 AM

CODE
{$CLEO .cs]
:Steed_11
wait 0 ms
if
0256:   player $PLAYER_CHAR defined
else_jump @Steed_11

:Steed_12
wait 0
if
047A:   actor $PLAYER_ACTOR driving_bike
else_jump @Steed_12
08C6: set_actor $PLAYER_ACTOR stay_on_bike 1
0A93: end_custom_thread

And if you want to have more directions in code than use gosub-return instead of two jumps at one place. Like this:
CODE
:Gosub
wait 0
gosub @1
gosub @2
jump @Gosub

:1
wait 0
your material
return

:2
wait 0
your material
return

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#6

Posted 05 May 2012 - 01:44 PM

Are you sure that the problem isn't your script? I've just tested that opcode and it works for quads.

My script:
CODE
{$CLEO .cs}

0000:

:MAIN
repeat
   wait 0
until 0AB0:  key_pressed 0x37
Model.Load(#QUAD)

repeat
   wait 0
until Model.Available(#QUAD)

04C4: store_coords_to 1@ 2@ 3@ from_actor $3 with_offset 2.0 0.0 0.0
0@ = Car.Create(#QUAD, 1@, 2@, 3@)
0249: release_model #QUAD

repeat
   wait 0
until Actor.InCar($3, 0@)
08C6: set_actor $3 stay_on_bike 1

repeat
   wait 1000 //No need to hurry
until not Actor.InCar($3, 0@)
Car.RemoveReferences(0@)
08C6: set_actor $3 stay_on_bike 0
jump @MAIN

Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#7

Posted 05 May 2012 - 02:31 PM

I deleted of all quad and it´s work on quads now and bikes




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users