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

 Taxi mod

 need help
 
nabnabnabn  
Posted: Thursday, Jul 26 2012, 01:59
Quote Post


Xbox modder
Group Icon
Group: Members
Joined: Aug 18, 2008

jolly-roger.gif

XXXXX



Hi guys,

I have been working on a mod wich is Taxi as I wrote on topic title and I keep having some problems with it. basically the main problem right now is that everytime someone hits the Taxi, the driver would get out to fight that person, and I don't want that.

is that a way to make the driver STAY in the taxi no matter what? confused.gif
I tried these and none of them helps:
CODE

0526: set_actor 44@ stay_in_car_when_jacked 1
039E: set_actor 44@ locked 1 while_in_car
0816: set_actor 44@ dont_chase_victim 1  
0946: set_actor 44@ actions_uninterupted_by_weapon_fire 0


none of them seems to help the driver continue driving suicidal.gif

also another thing wich I noticed, is there a way to make the driver drive normal? everytime I tell him to take me to a place he would drive like crazy and keep hitting other people and cars and many objects, and he doesnt remain on path. is there an opcode to fix this?

this is what I'm using:
CODE

03AB: set_car 45@ strong 1
04C4: store_coords_to 49@ 50@ 51@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
Car.SetDriverBehaviour(45@, FollowRoad)
00AE: set_car 45@ traffic_behaviour_to 1 // I tried 0 but he keeps stopping for everyone.
Car.SetSpeedInstantly(45@, 5.0)
Car.DriveTo(45@, 41@, 42@, 43@)
Car.SetMaxSpeed(45@, 20.0)
03ED: set_car 45@ disable_flipped_explosion_when_empty 1


and also and I think it's the last simple problem tounge.gif
could someone help me to make the payment seem real?
I mean I don't want to make the Taxi driver take too much money or too low money smile.gif
and here is where I used for payment:
CODE

04C4: store_coords_to 46@ 47@ 48@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
0509: 52@ = distance_between_XY 49@ 50@ and_XY 46@ 47@
0092: 52@ = float 52@ to_integer
52@ /= 20


as you can see, I used the distance opcode for the money.
so 52@ is the distance.
what this one does is get distance, convert it to integer and then divide it by 20 (this is the confusion I'm in) and then it takes away the amount of money from the player actor.

so the reason I'm asking this is that I don't know how much is the price per meter in USA tounge.gif
so could someone tell me how much exactly it is? smile.gif and also is the distance opcode counts by meter or feet?

thanks in advance. biggrin.gif

Note: I only use main.scm because I'm a console user!
Users WebsitePMMSNYahoo
  Top
 

 
fireguy109  
Posted: Thursday, Jul 26 2012, 03:17
Quote Post


Chronic post editor.
Group Icon
Group: Leone Family Mafia
Joined: Aug 30, 2010

us.gif

XXXXX



Nowadays in the US per-mile charges can run around three bucks (on top of the initial charge). In the times SA is set in, per-mile charges would probably still be around $1.70 or so. Keep in mind your script measures distance as the crow flies, so the distance is actually much greater since the car has to follow the roads and paths which most likely wind a bit, especially for long-distance trips. Therefore, you might want an even higher charge like $1.80 or so per mile. I think the distance opcode counts in in-game units (1 unit is usually about a yard), so

CODE
X [distance in units] / 1750 [roughly a mile, we'll say - converting value] = Y [new distance]

Y [new distance] * Z [cost per mile - could be between 1.6 and 1.9] + W [initial charge - $3 or so is realistic] = total cost


If this makes the trips super cheap or super expensive, I was wrong about the measurement units. lol.gif

You may want to go with 1/2 or even 1/4 of that converting value, otherwise you'd end up with basically free taxi rides for short hops. tounge.gif

Also, if I may make a suggestion, why not program a limo/town car service alongside it? You could use the same script, just spawn an actor in nicer clothes and a Stretch instead of a Taxi, and use a much higher cost-per-mile. That way you could choose between the two.

This post has been edited by fireguy109 on Thursday, Jul 26 2012, 03:45
Users WebsitePMPlayStation Network
  Top
 

 
nabnabnabn  
Posted: Friday, Jul 27 2012, 04:49
Quote Post


Xbox modder
Group Icon
Group: Members
Joined: Aug 18, 2008

jolly-roger.gif

XXXXX



QUOTE (fireguy109 @ Thursday, Jul 26 2012, 03:17)
Nowadays in the US per-mile charges can run around three bucks (on top of the initial charge). In the times SA is set in, per-mile charges would probably still be around $1.70 or so. Keep in mind your script measures distance as the crow flies, so the distance is actually much greater since the car has to follow the roads and paths which most likely wind a bit, especially for long-distance trips. Therefore, you might want an even higher charge like $1.80 or so per mile. I think the distance opcode counts in in-game units (1 unit is usually about a yard), so

CODE
X [distance in units] / 1750 [roughly a mile, we'll say - converting value] = Y [new distance]

Y [new distance] * Z [cost per mile - could be between 1.6 and 1.9] + W [initial charge - $3 or so is realistic] = total cost


If this makes the trips super cheap or super expensive, I was wrong about the measurement units. lol.gif

You may want to go with 1/2 or even 1/4 of that converting value, otherwise you'd end up with basically free taxi rides for short hops. tounge.gif

Also, if I may make a suggestion, why not program a limo/town car service alongside it? You could use the same script, just spawn an actor in nicer clothes and a Stretch instead of a Taxi, and use a much higher cost-per-mile. That way you could choose between the two.

hey again,

This is what I did:

CODE
04C4: store_coords_to 46@ 47@ 48@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
0509: 52@ = distance_between_XY 49@ 50@ and_XY 46@ 47@
0092: 52@ = float 52@ to_integer
52@ *= 2
52@ += 3


with this convertion, the cost from 8track stadium to CJ's house was 325$ isn't that kinda too high? tounge.gif or did I do something wrong? lol.gif

what's pissing me off about this is that the driver would get out of his car everytime someone hits his car!!

and yeah I also plan on doing the same with limo and probably another car that will have one of his gangs family driving it, so that it would be cheaper tounge.gif

and ... JUST HOW THE HECK DO I FORCE THE STUPID DRIVER STAY IN THE DARN TAXI?! facedesk.gif

This post has been edited by nabnabnabn on Friday, Jul 27 2012, 05:20
Users WebsitePMMSNYahoo
  Top
 

 
fireguy109  
Posted: Friday, Jul 27 2012, 05:47
Quote Post


Chronic post editor.
Group Icon
Group: Leone Family Mafia
Joined: Aug 30, 2010

us.gif

XXXXX



Not sure about the driver issue, though that might be solved with 020A: set_car 0@ door_status_to 4 which would theoretically lock the player and driver inside the car.

As for the money thing, you forgot the division step. wink.gif
CODE
04C4: store_coords_to 46@ 47@ 48@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
0509: 52@ = distance_between_XY 49@ 50@ and_XY 46@ 47@
0092: 52@ = float 52@ to_integer
52@ /= 875 // converting to a 'mile', you can play with this value
52@ *= 2 // $2 cost per 'mile'
52@ += 3 // $3 flat charge

Try that.
Users WebsitePMPlayStation Network
  Top
 

 
oksa8  
Posted: Friday, Jul 27 2012, 07:41
Quote Post


Just call me Oksu
Group Icon
Group: Members
Joined: Sep 30, 2010

sf.gif

Member Award




AFAIK, locking a car will allow you to come out but not get in.
Users WebsitePM
  Top
 

 
SilentPL  
Posted: Friday, Jul 27 2012, 11:44
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




QUOTE (oksa8 @ Friday, Jul 27 2012, 09:41)
AFAIK, locking a car will allow you to come out but not get in.

Door status 4 locks both getting in and getting out. You're just screwed trapped inside.
Users WebsitePMMSNXbox Live
  Top
 

 
fireguy109  
Posted: Friday, Jul 27 2012, 14:32
Quote Post


Chronic post editor.
Group Icon
Group: Leone Family Mafia
Joined: Aug 30, 2010

us.gif

XXXXX



QUOTE (SilentPL @ Friday, Jul 27 2012, 06:44)
QUOTE (oksa8 @ Friday, Jul 27 2012, 09:41)
AFAIK, locking a car will allow you to come out but not get in.

Door status 4 locks both getting in and getting out. You're just screwed trapped inside.

Aye, and then once you get to your destination you can unlock the doors through the script then hop out. Might be a good idea to build in an override button or something to unlock the doors at any time in case the car starts driving in circles. lol.gif
Users WebsitePMPlayStation Network
  Top
 

 
nabnabnabn  
Posted: Friday, Jul 27 2012, 17:45
Quote Post


Xbox modder
Group Icon
Group: Members
Joined: Aug 18, 2008

jolly-roger.gif

XXXXX



ok I tested with that and from grove street to the ammunation near ls downtown cost 5$, is that right? tounge.gif

also thanks about the door statue! biggrin.gif now the driver doesn't get out as I wanted and also I did add security buttons for that lol.gif
Users WebsitePMMSNYahoo
  Top
 

 
fireguy109  
Posted: Friday, Jul 27 2012, 17:53
Quote Post


Chronic post editor.
Group Icon
Group: Leone Family Mafia
Joined: Aug 30, 2010

us.gif

XXXXX



QUOTE (nabnabnabn @ Friday, Jul 27 2012, 12:45)
ok I tested with that and from grove street to the ammunation near ls downtown cost 5$, is that right? tounge.gif

Honestly? I've no idea, since I've never even played SA (never got around to it on PS2, then couldn't find it cheap for PC) and have no idea of the scale. If it seems too expensive, play around with the '875' value in the division step. Making it bigger should make the trip cheaper. It seems about right to me when I look at an overhead map though. smile.gif
Users WebsitePMPlayStation Network
  Top
 

 
oksa8  
Posted: Friday, Jul 27 2012, 18:01
Quote Post


Just call me Oksu
Group Icon
Group: Members
Joined: Sep 30, 2010

sf.gif

Member Award




Well, SA is based on 6x6 kilometer map, so distances are actually really small. (Coordinates = distance from center of the map in meters.)

So yeah, 5$ is pretty close I think.
Users WebsitePM
  Top
 

 
nabnabnabn  
Posted: Friday, Jul 27 2012, 19:07
Quote Post


Xbox modder
Group Icon
Group: Members
Joined: Aug 18, 2008

jolly-roger.gif

XXXXX



Alrighty then, gonna leave the cost convertion like that and I have found another problem suicidal.gif

when ever I chose I very long distance as for example from CJ's house to the beach, and then I use the skip button wich I put in the script so it allows the taxi to teleport straight to the destination, but the Taxi teleports to underground in that destination notify.gif
I was thinking maybe this would fix the problem cause I was thinking maybe the collision doesn't load.

CODE
04C4: store_coords_to 41@ 42@ 17@ from_actor 0@ with_offset 0.0 0.0 0.0
04E4: refresh_game_renderer_at 41@ 42@
Camera.SetAtPos(41@, 42@, 17@)
wait 100
02CE: 43@ = ground_z_at 41@ 42@ 17@
43@ += 1.0
0167: 40@ = create_marker_at 41@ 42@ 43@ color 0 flag 2


tho this really doesn't fix that problem confused.gif
Users WebsitePMMSNYahoo
  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