Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,926 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
pxltdaapl

[CLEO] Help with a couple of "simple" scripts

Recommended Posts

pxltdaapl

Greetings!

I want to note that I'm new at coding scripts and so, and my knowledge is as basic as possible. I'd also like to note that I learn coding best from studying done scripts.

So, I have some scripts I want to make, but have no idea how to make them. Well, I do have idea how to make them, but don't really know how to make them.

 

So, the 1st script I want to make is to not lose stars after some time. So for example, if you accumulate 1 star in game, it stays forever. Or if you get 2 start, you have 2 stars whole time, until you load a save, get busted or similar. I tried to make that script by myself, but I couldn't. I tried, but I think I made an infinite loop that makes game freeze when it loads a save. I don't know how to solve it, and I'm pretty sure I've done it wrong.

 

:START

[email protected] = player.WantedLevel ($PLAYER_CHAR)

 

:1

if [email protected] = 1

jf jump @2

player.WantedLevel ($PLAYER_CHAR) = 1

 

:2

if [email protected] = 2

jf jump @3

player.WantedLevel ($PLAYER_CHAR) = 2

 

:3

...

 

You get an idea what I was trying to do. Problem is, however, that it doesn't work + Wanted level couldn't increase (I guess) because if player had 1 star, he couldn't get 2 star wanted level because the script keeps giving him 1 star because he first had only 1 star.

So, player's wanted level should be able to increase, but not to decrease.

 

 

 

 

 

 

 

 

Another script, that I really don't know how to make is for player to be able to buy cars. Say you come to Otto Autos or any other car dealer, there should be a red cylinder that you enter and get a list of cars that you can buy. There is no need for displaying cars, just a list in which you select a car and lose your money once it spawns. If someone could make an example for that script for me, that would be really awesome. Just an example with choice of 2 or 3 cars, just so I can get an idea how to finish such script.

 

 

 

 

 

 

 

Another one, which is connected to the script above is to get 1 star wanted level for stealing a car. It would be hard to do with parked cars, because I guess you would get a star for entering your bought car (see script above this one) which would suck. So, basically, if you jack a ped's car, you get 1 star wanted level, no matter police officer saw you or not. Problem is, also, what if player had 3 stars and jacked a car? Would he go back to 1 star wanted level?

 

 

 

 

 

 

 

 

And, lastly, simplest script on the list, I guess. Player gets busted immediately after getting hit with a nightstick by police officer. I have an idea how to make this script, but I don't know how to make game check if player was hit by a nightstick. There is no need to check if player was hit by a police officer because only they use nightsticks.

 

:START

if player hit by a nightstick

jf jump @START

player.struct (something like that, i have to check it on my other computer, but I know how to code player get busted)

jump @START

 

 

 

 

 

Those are all scripts I need help with. I would greatly appreciate if anyone could help me make any of those. Even if you can't make it exactly as I asked, I would be delighted if you could do anything similar to it. I mean anything similar would help me a bunch, although I would prefer scripts to be made as I stated above.

Thanks a lot for your time, I thank you for your time and effort. :)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

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