Quantcast

Jump to content

» «
Photo

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

No replies to this topic
pxltdaapl
  • pxltdaapl

    Player Hater

  • New Members
  • Joined: 03 Aug 2014
  • None

#1

Posted 06 August 2014 - 05:40 PM

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

1@ = player.WantedLevel ($PLAYER_CHAR)

 

:1

if 1@ = 1

jf jump @2

player.WantedLevel ($PLAYER_CHAR) = 1

 

:2

if 1@ = 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. :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users