IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Car Exitter Problem

 The Mod is crashing the whole game
 
kiffz  
Posted: Saturday, Apr 14 2012, 17:11
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 14, 2012

XXXXX



Hi @ all, i was scripting a mod, which lets you exit the Car, you are driving and spawning 2 Meters above it, but it is crashing the gama, so can you help me, to fix this?
would be really nice

CODE

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
wait 0
:EXITCAR_0
if
Actor.Defined($PLAYER_ACTOR)
else_jump @EXITCAR_10
jump @EXITCAR_1

:EXITCAR_1
if and
0ADC:   test_cheat "ECAR"
Actor.Driving($PLAYER_ACTOR)
not Actor.Dead($PLAYER_ACTOR)
else_jump @EXITCAR_10
00BC: show_text_highpriority GXT 'CHEAT1' time 1000 flag 1
018C: play_sound 1058 at 0.0 0.0 0.0
jump @EXITCAR_2

:EXITCAR_2
03C0: 1@ = actor $PLAYER_ACTOR car
jump @EXITCAR_3

:EXITCAR_3
if
   Car.Defined(1@)
else_jump @EXITCAR_2
jump @EXITCAR_4


:EXITCAR_4
Car.StorePos(1@, 2@, 3@, 4@)
4@ += 2.0
Car.Health(1@) = 1000
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 2@ 3@ 4@
Camera.SetBehindPlayer()
jump @EXITCAR_10




:EXITCAR_10
jump @EXITCAR_0


This post has been edited by kiffz on Saturday, Apr 14 2012, 17:27
PM
  Top
 

 
spaceeinstein  
Posted: Saturday, Apr 14 2012, 17:37
Quote Post


巧克力
Group Icon
Group: Members
Joined: Jul 17, 2003

cn.gif

Member Award




CODE
jump @EXITCAR_1

:EXITCAR_1

Where did you learn to do this?

CODE
wait 0
:EXITCAR_0

Code reads top to bottom, not bottom to top.
Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Saturday, Apr 14 2012, 17:39
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



You didn't name your thread. And didn't put waits. And your check if car is defined is not necessery because the car is always defined when you're driving it.
If that doesn't work try this:

CODE
{$CLEO .cs}

0000: NOP //Name the thread (or use NOP as I did)

:EXIT_CAR
while Player.Defined($PLAYER_CHAR)
   if and
       Actor.Driving($PLAYER_ACTOR)
       0ADC:   test_cheat "ECAR"
   then
       00BC: show_text_highpriority GXT 'CHEAT1' time 1000 flag 1
       03C0: 1@ = actor $PLAYER_ACTOR car
       Car.StorePos(1@, 2@, 3@, 4@)
       4@ += 2.0
       Car.Health(1@) = 1000
       0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 2@ 3@ 4@  
       018C: play_sound 1058 at 2@ 3@ 4@ //Place at the right location
   end
end
jump @EXIT_CAR


EDIT: Wow three post in a row

This post has been edited by Bad.boy! on Saturday, Apr 14 2012, 17:41
PM
  Top
 

 
Link2012  
Posted: Saturday, Apr 14 2012, 17:40
Quote Post


Wut?
Group Icon
Group: Members
Joined: Jan 30, 2011

ba.gif

XXXXX



No wait, that's the problem. (...)

Put a wait at EXITCAR_0 and EXITCAR_2

@Bad.boyl
The wait 0 in the top of his script will have the same effect as your 0000: NOP
Using NOP instead of wait 0 saves 2 bytes tounge.gif

This post has been edited by Link2012 on Saturday, Apr 14 2012, 17:42
PMMSN
  Top
 

 
The_Sorrow  
Posted: Saturday, Apr 14 2012, 17:42
Quote Post


Heaven, I'm in heaven(8)
Group Icon
Group: Members
Joined: May 31, 2010

en.gif

XXXXX



Does it work now?

Solution answered by different members.
Users WebsitePMMSN
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG