Jump to content

Help for Coding Project


Recommended Posts

I saw a few other topics about how it was possible to create "garage like" areas where cars could be saved. I want to do this at a certain location and I figured, if I ask any of the pros on here, they won't do it because they're busy with other stuff so I should do it my own. There is only one problem, I am a COMPLETE noob when it comes to coding in the SCM and all I have done was follow a tutorial on how to spawn a car. I saw that a guy named Nubbel who made that 80 Car Park Garage Mod started by making "garage like" areas outside of Mad Dogg's Place. I have the same idea, but I want the areas in a different place.

 

I was wondering if someone could help me with trying to make these "garage like" areas by either posting code or explaining how I could go about doing this. I would want the areas to look like this:

user posted image

 

They would also have to be able to save cars that were put in to the game. NOT cars modded at TransFender but mods of real cars that I already have. I have SannyBuilder, SAMB, IMG Tool, San Andreas Place Manager but I don't know what to do next. tounge2.gif

 

Anyone willing to help? colgate.gif

Edited by Hecktix
Link to comment
https://gtaforums.com/topic/434866-help-for-coding-project/
Share on other sites

 

why not read in the topic with titel:  NUBBEL'S 80 Cars Garage Mod Question!

its just a topic of Dec 4 2009

find it the topic list, open your eyes

So I just copy that code in to my main.scm and then change the coords for where I want it?

 

EDIT: So would this be my code? Where would I put the code in my main.scm? At what part of it?

 

:SVGRG_490001: wait 0 ms00D6: if0038:   13@ == 0004D: jump_if_false @SVGRG_4900D6: if00A4:   actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406004D: jump_if_false @SVGRG_49..................00D6: if00A4:   actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406004D: jump_if_false @SVGRG_54200D6: if and01AC:   car $PLAYERCAR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406 stopped00E1:   player 0 pressed_key 15004D: jump_if_false @SVGRG_2760050: gosub @SVGRG_6640004: 13@ = 1:SVGRG_4830001: wait 0 ms00D6: if00A4:   actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406004D: jump_if_false @SVGRG_5420002: jump @SVGRG_483:SVGRG_54200D6: if00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @SVGRG_5650050: gosub @SVGRG_1508:SVGRG_5650050: gosub @SVGRG_13680395: clear_area 2 at 291.8839 -1172.164 radius 80.909903BA: clear_cars_from_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.914060001: wait 10 ms

 

Edited by Hecktix

 

why not read in the topic with titel:  NUBBEL'S 80 Cars Garage Mod Question!

its just a topic of Dec 4 2009

find it the topic list, open your eyes

So I just copy that code in to my main.scm and then change the coords for where I want it?

 

EDIT: So would this be my code? Where would I put the code in my main.scm? At what part of it?

 

:SVGRG_490001: wait 0 ms00D6: if0038:   13@ == 0004D: jump_if_false @SVGRG_4900D6: if00A4:   actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406004D: jump_if_false @SVGRG_49..................00D6: if00A4:   actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406004D: jump_if_false @SVGRG_54200D6: if and01AC:   car $PLAYERCAR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406 stopped00E1:   player 0 pressed_key 15004D: jump_if_false @SVGRG_2760050: gosub @SVGRG_6640004: 13@ = 1:SVGRG_4830001: wait 0 ms00D6: if00A4:   actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.91406004D: jump_if_false @SVGRG_5420002: jump @SVGRG_483:SVGRG_54200D6: if00DF:   actor $PLAYER_ACTOR driving004D: jump_if_false @SVGRG_5650050: gosub @SVGRG_1508:SVGRG_5650050: gosub @SVGRG_13680395: clear_area 2 at 291.8839 -1172.164 radius 80.909903BA: clear_cars_from_cube_cornerA 304.9114 -1180.712 80.9141  cornerB 298.2624 -1186.823 80.914060001: wait 10 ms

 

no, it shows only the lines which must be modified to change the location

the garage script is there: Nubbels script for sannybuilder

Error when compiling script. It said that Parameter 5 was not set. I am guessing my coords were not correct. What coords am I supposed to get? I got the X,Y,Z for the lower left front and the X,Y,Z for the top right back.. am I missing some? I put the whole code after the MAIN thread ended and before the INT thread started because I couldn't find "Mission - 0".

 

;----------------------------------------------      ;Player in garage, then go to car spawn routine;----------------------------------------------00D6: if  000A4:    actor $PLAYER_ACTOR  0 ()in_cube   305.9872 -1180.777 80.91406; 277.0178 -1164.695 80.91406004D: jump_if_false ££GRG_02

 

Edited by Hecktix
How old are you? 7 or 9 years? I believe youre not able to do mission coding.

You don't read informations careful.

I just want to know what coordinates I'm supposed to use. I understand what to do with the script. I thought this was coding help....

I think its possible to replace the

 

00A4:    actor $PLAYER_ACTOR  0 ()in_cube   305.9872 -1180.777 80.91406; 277.0178 -1164.695 80.91406

 

with

 

00EE:   actor $PLAYER_ACTOR 0 near_point 2067.4 -1831.2 radius 15.0 15.0 in_car 

 

 

because:

 

Nubel used 00A4: because he wanted to use all floors of the car park, so he used the in_cube code (to use a Z axis distance)

 

but in your case you can use 00EE: with a radius of e.g. 20

 

just store the coords of the place and use its X and Y coords plus a radius.

 

 

Edited by The_Siggi

 

I think its possible to replace the

 

00A4:    actor $PLAYER_ACTOR  0 ()in_cube   305.9872 -1180.777 80.91406; 277.0178 -1164.695 80.91406

 

with

 

00EE:   actor $PLAYER_ACTOR 0 near_point 2067.4 -1831.2 radius 15.0 15.0 in_car 

 

 

because:

 

Nubel used 00A4: because he wanted to use all floors of the car park, so he used the in_cube code (to use a Z axis distance)

 

but in your case you can use 00EE: with a radius of e.g. 20

 

just store the coords of the place and use its X and Y coords plus a radius.

 

Well I finally got it to compile but when I went in to the game to where the garage was supposed to be it didn't save my car so yes I will try what you suggested.

 

One question though, for the X and Y coords, which points of the garage should I record? I am trouble finding the right points.

 

EDIT: I played around with the coords and I started with the X,Y of the lower left front and top left back part of the garage "305.4204 -1180.822" and I also used the 00EE code but after several compiling errors of too many parameters, once I shortened it to only the lower left front X and Y I got this error:

 

ERROR: Parameter  5 not set.03BA: clear_cars_from_point 305.4204 -1180.822 RADIUS 15.0 15.0 IN_CAR

The 00EE code worked for the replacement of the 00A4 but I'm guessing its not used for the 03BA: clear_cars command because after changing the 03BA: to 00EE: I got this error:

 

ERROR: Parameter  4 not set.00EE: CLEAR_CARS_FROM_POINT 305.4204 -1180.822 RADIUS 15.0 15.0 IN_CAR

 

 

So someone please tell me what coords I have to use and what code I have to replace to change the location of this fricken garage. Its not as easy as nubbel made it seem or I'm just too much of a noob. suicidal.gif

Edited by Hecktix

Ok well, I've given up on this, it's too complicated for me. Thanks The_Siggi for actually helping me.

 

ZAZ, I can follow directions fine. I just have trouble following them when the person telling me can't speak proper English. Go take it up the ass from another fa**ot. I know you'll enjoy it.

calm down....

 

 

00EE: CLEAR_CARS_FROM_POINT 305.4204 -1180.822 RADIUS 15.0 15.0 IN_CAR

 

is wrong:

the originally function of 00EE: is:

 

00EE:   actor $PLAYER_ACTOR 0 near_point 2067.4 -1831.2 radius 15.0 15.0 in_car 

 

you can't combine two differnt opcodes lie you did;

 

03BA: clear_cars_from_cube_cornerA 2288.28 -1648.13 14.0 cornerB 2274.92 -1641.33 14.31 

 

works for cubes only

(furthermore 03BA: is a set opcode and 00EE: is a condition)

 

Well I never used the in_cube opcode but I think it defines a cube which size is set by the six coords:

1st, 2nd, 3rd are the lower corner on the left (front) and the 4th, 5th and 6th coords define the upper corner on the right (back)

 

or was it the other way round mercie_blink.gifbiggrin.gif

 

Ok well, I've given up on this, it's too complicated for me. Thanks The_Siggi for actually helping me.

 

ZAZ, I can follow directions fine. I just have trouble following them when the person telling me can't speak proper English. Go take it up the ass from another fa**ot. I know you'll enjoy it.

ZAZ does a damn lot for this community. He consistently posts in topics helping people and gives tips and advice. So what if he may not be able to speak proper english, look at this country flag.

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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