Jump to content

Questions


pdmods

Recommended Posts

Hi,

 

i have 2 questions:

 

-How can i make a marker, when i enter the marker i get cash ??

 

-How can i make checkpoints on the radar with a other color?

 

Can you help me with this? plz help mee. this for gta san andreas

 

Thanks

Link to comment
Share on other sites

 

-How can i make a marker, when i enter the marker i get cash ??

 

I'm not sure what you mean by marker, but if your talking pickups or checkpoints you could just use the D3D9 hook and check there position every frame

OR

check whether the player is in a checkpoint and compare that to if they were last time

OR

validate whether pickups are picked up and make the appropriate changes if they 'become' picked up

 

 

-How can i make checkpoints on the radar with a other color?

 

 

0165=2,set_marker %1d% color_to %2d% 

 

Link to comment
Share on other sites

Well, It's fairly Simple...

 

- You want to 1st create the Marker on the Map Somewhere.

- You want to Detect if the Player is In the Checkpoint

- You want to give him +10000 cash or as Much as you want

 

This Code will Create the Marker

 

02A7: $439 = create_icon_marker_and_sphere $441 at X Y Z

 

 

Then See if the Player is Near the Point

00D6: if  000ED:   player $2 0 ()near_point_on_foot X Y radius  4.0  4.0

 

 

This Code will Give the Player $10000

 

0109: player $2 money +=  10000

 

 

Please Correct me if i'm Wrong, this was off the Top of my head.

Edited by l3mmy
Link to comment
Share on other sites

yeap it should work, mind there is possibility to use cash pickup so you will not have to wonder around how to prevent ininite loop when player reaches marker.

Link to comment
Share on other sites

Please don't use $2 when you 're advising other people - he won't have any idea that $2 is equal to $PLAYER_CHAR (he's going to replace it with exactly that anyways I think).

Why do you use $2 and $3? Laziness? tounge.gif

Link to comment
Share on other sites

naww lol, Just cuts the Time down, Plus im am quite new to sa Coding, But i'll use $PLAYER_CHAR instead tounge.gif

Link to comment
Share on other sites

Ok, Here's One i whipped Up.

 

Add

 

 

02A7: $439 = create_icon_marker_and_sphere $441 at X Y Z

 

Replace X Y and Z with your Own Co ords (this is where the Marker will be)

to the Bottom of Main, Then add

 

004F: create_thread ££CASH_1 

 

underneath that.

 

Then add this to the Bottom of the Script.

 

 

:CASH_10001: wait  250 ms00D6: if  000ED:   actor $3 0 ()near_point_on_foot X Y radius  4.0  4.0004D: jump_if_false ££CASH_10109: player $2 money +=  10000   0001: wait 5000 ms0002: jump ££CASH_1

 

 

Replace X and Y with your X and Y Co ordinates from the Game.

 

This will Create the Marker, then If you are In it - Give you $10,000 every 5 Seconds.

This Code Does work, I have Created and Tested it Fully colgate.gif

Edited by l3mmy
Link to comment
Share on other sites

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

×
×
  • Create New...

Important Information

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