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

 Place Vehicle [CLEO]

 
rocketfingers14  
Posted: Friday, Apr 17 2009, 11:27
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 17, 2009

XXXXX



I have a problem with a vehicle place. I use this code:

CODE

{$CLEO .cs}
0000: NOP

0247: request_model #INFERNUS
038B: load_requested_models

00A5: $WOZ = create_car #INFERNUS at 2499.2476 -1684.218 12.9276
0175: set_car $WOZ z_angle_to 102.7758

0A93: end_custom_thread


The Car should to stand right here:

user posted image

But this car stand here:

user posted image

So, the question is: What I'm doing bad? And what I must to do to place this car where I want?


PS: I'm sorry, my english is not very good biggrin.gif
PM
  Top
 

 
Doomed_Space_Marine  
Posted: Friday, Apr 17 2009, 11:55
Quote Post


Thug
Group Icon
Group: Members
Joined: Jul 21, 2007

lh.gif

XXXXX



Maybe vehicle is created when you are far from its spawn location? Then COLs aren't loaded, vehicle falls through the ground and appears on the nearest point in the cars path. To make it stay near player, it would be better to make it unable to move and when player is near, enable moving. The opcode must be 0519, I think.
Users WebsitePM
  Top
 

 
Dutchy3010  
Posted: Friday, Apr 17 2009, 14:21
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




As a addition to the post above.

First, never forget to check if the model is available.

CODE
repeat
wait 0
until Model.Available(#INFERNUS)


Second, don't use global variables in a CLEO script. Use Local Variables instead. wink.gif

CODE
00A5: 1@ = create_car #INFERNUS at 2499.2476 -1684.218 12.9276
0175: set_car 1@ z_angle_to 102.7758
Users WebsitePMMSNPlayStation Network
  Top
 

 
rocketfingers14  
Posted: Friday, Apr 17 2009, 15:18
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 17, 2009

XXXXX




Doomed I use this opcode (0519) and everything is ok but the car is
above ground.

PICTURE:

user posted image

What now?

This post has been edited by rocketfingers14 on Friday, Apr 17 2009, 15:23
PM
  Top
 

 
Dutchy3010  
Posted: Friday, Apr 17 2009, 15:27
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




Don't think too hard. What would you do, if you spawn a car to high? Just lower your z-value. Make it, for example, 11.6276, and it will look beautiful.

Most likely there are other solutions, but this is easy, so why not using it? tounge.gif
Users WebsitePMMSNPlayStation Network
  Top
 

 
rocketfingers14  
Posted: Friday, Apr 17 2009, 16:05
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 17, 2009

XXXXX



It doesn't work ;/ I don't know what I'm doing bad. Can you write for me whole skeleton of code?


HAHAHA I do it biggrin.gif I know what I'm doing bad tounge.gif. Thanks for all :]

This post has been edited by rocketfingers14 on Friday, Apr 17 2009, 16:17
PM
  Top
 

 
Dutchy3010  
Posted: Friday, Apr 17 2009, 16:18
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




This works for me:

CODE
{$CLEO .cs}

0247: request_model #INFERNUS
038B: load_requested_models

repeat
wait 0
until Model.Available(#INFERNUS)

00A5: 1@ = create_car #INFERNUS at 2499.2476 -1684.218 11.6276
0175: set_car 1@ z_angle_to 102.7758
Car.LockInCurrentPosition(1@) = True

repeat
wait 0
until 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2499.2476 -1684.218 12.9276 radius 10.0 10.0 10.0

Car.LockInCurrentPosition(1@) = False

0A93: end_custom_thread


Coding is certainly not only using opcodes, but it is also a bit of creativity. I don't know a "nice" way to make it, I'm afraid, so I invent something.

user posted image
Users WebsitePMMSNPlayStation Network
  Top
 

 
rocketfingers14  
Posted: Saturday, Apr 18 2009, 08:19
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 17, 2009

XXXXX



Yea I know, i have to do some new missions with cars, now i know how to place it :]

PS: When i end, maybe i show this missions in gtaforums :]
PM
  Top
 

 
rocketfingers14  
Posted: Sunday, Apr 19 2009, 15:30
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 17, 2009

XXXXX



eeh.. I have next problem ;/

I want to place car here: (2 wheels on the road, 2 on the pavement)

user posted image


I use this code:

CODE

{$CLEO .cs}
0000: NOP

0247: request_model #ADMIRAL
038B: load_requested_models

:check
wait 10
Model.Available(#ADMIRAL)
jf @check

00A5: 2@ = create_car #ADMIRAL at 2472.752 -1737.5663 11.5276
0175: set_car 2@ Z_angle_to 271.3138
0519: set_car 2@ locked 1
wait 1000
0519: set_car 2@ locked 0
 
0A93: end_custom_thread


And the car stay here:

user posted image

What i have to do to place this car as in the picture 1?
PM
  Top
 

 
Little Psycho  
Posted: Sunday, Apr 19 2009, 15:32
Quote Post


Unofficial supporter of ms.cooldude mods, lolz
Group Icon
Group: BUSTED!
Joined: Mar 14, 2009

XXXXX



That's impossible to do, dude.
PM
  Top
 

 
rocketfingers14  
Posted: Sunday, Apr 19 2009, 15:51
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 17, 2009

XXXXX



Why?! confused.gif and how you know it? tounge.gif

Maybe It's possible biggrin.gif
PM
  Top
 

 
Little Psycho  
Posted: Sunday, Apr 19 2009, 15:56
Quote Post


Unofficial supporter of ms.cooldude mods, lolz
Group Icon
Group: BUSTED!
Joined: Mar 14, 2009

XXXXX



QUOTE (rocketfingers14 @ Apr 19 2009, 15:51)
Why?! confused.gif and how you know it? tounge.gif

Maybe It's possible biggrin.gif

It's hardcoded in all GTA arcade games (from GTA3 to VCS), that all vehicle "weight" stay on the same place, but when you "touch" the vehicle, the weight of car is getting to other sides. However in GTA4, it's fixed. I think it's engine issue.
PM
  Top
 

 
rocketfingers14  
Posted: Sunday, Apr 19 2009, 16:03
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 17, 2009

XXXXX



sh*t bored.gif I write script with new mission and cars staying unreal ;/

EDIT: But when i edit main.scm and i create new car, he's staying where i place him and everything is ok.

This post has been edited by rocketfingers14 on Sunday, Apr 19 2009, 16:07
PM
  Top
 

 
MOrdecki  
Posted: Monday, Apr 20 2009, 17:35
Quote Post


Scripter
Group Icon
Group: Members
Joined: Jul 10, 2006

pl.gif

XXXXX



QUOTE (rocketfingers14 @ Apr 19 2009, 16:03)
sh*t  bored.gif I write script with new mission and cars staying unreal ;/

EDIT: But when i edit main.scm and i create new car, he's staying where i place him and everything is ok.

Well actually there is an way ..
You can put your car at his place again, it shuld fix.

CODE
Car.PutAt(2@, 2472.752, -1737.5663, 11.5276)


Even if that does't work, try to create random ped in your car then just destroy him, this way MUST work.

CODE
0560: create_random_actor_in_car 2@ handle_as 3@
Actor.DestroyInstantly(3@)


This post has been edited by MOrdecki on Monday, Apr 20 2009, 17:42
Users WebsitePMMSNXbox Live
  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