Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

Script Help


Zero94
 Share

Recommended Posts

 

{$CLEO .cs}//----------MAIN-------------thread 'MONEY'ifPlayer.WantedLevel($PLAYER_CHAR) = 0else_jump @Reset_WLjump @Check_Playa:Check_Playawait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @Check_Playajump @Money:Moneyif0AB0: key_pressed 78else_jump @MoneyPlayer.Money($PLAYER_CHAR) +=500000jump @Money:Reset_WLPlayer.WantedLevel($PLAYER_CHAR) = 0jump @Check_Playa

 

 

I just tried to script something with my (almost nothing) knowledges.

 

When I press N CJ will be rewarded with 500000$. The problem is when I press N nothing happens. The problem is the game crash after the loading save screen. ph34r.gif

Edited by Zero94
Link to comment
Share on other sites

Michael-Knight1
{$CLEO}thread 'MONEY':Check_Playawait 0if0256:   player $PLAYER_CHAR defined else_jump @Check_Playaif and010F:   player $PLAYER_CHAR wanted_level > 0 0AB0: key_pressed 78else_jump @Check_PlayaPlayer.Money($PLAYER_CHAR) +=500000jump @Check_Playa

 

Edited by Michael-Knight1
Link to comment
Share on other sites

 

{$CLEO}0000:while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if and           810F:   not player $PLAYER_CHAR wanted_level > 0           0AB0:  key_pressed 78       then           0109: player $PLAYER_CHAR money += 500000           wait 250       end   endend

 

 

For your understanding:

 

{$CLEO .cs}0000: NOP :Noname_2wait 0 if   Player.Defined($PLAYER_CHAR)else_goto @Noname_59 if and  not Player.WantedLevel($PLAYER_CHAR) > 0  Key.VirtualKeyCode(VK_KEY_N)else_goto @Noname_59 Player.Money($PLAYER_CHAR) += 500000wait 250 :Noname_59jump @Noname_2 

 

Link to comment
Share on other sites

Michael-Knight1
{$CLEO}0000:while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if and           810F:   not player $PLAYER_CHAR wanted_level > 0           0AB0:  key_pressed 78       then           0109: player $PLAYER_CHAR money += 500000           wait 250       end   endend

 

 

For your understanding:

 

{$CLEO .cs}0000: NOP :Noname_2wait 0 if   Player.Defined($PLAYER_CHAR)else_goto @Noname_59 if and  not Player.WantedLevel($PLAYER_CHAR) > 0  Key.VirtualKeyCode(VK_KEY_N)else_goto @Noname_59 Player.Money($PLAYER_CHAR) += 500000wait 250 :Noname_59jump @Noname_2 

 

small mistake...

 

He Need if wanted level 0 , no if not wanted level 0 .

 

 

010F:   player $PLAYER_CHAR wanted_level > 0 

 

 

Thanks

 

 

Link to comment
Share on other sites

 

small mistake...

 

He Need if wanted level 0 , no if not wanted level 0 .

 

 

010F:   player $PLAYER_CHAR wanted_level > 0 

 

 

Thanks

LMAO. You're not too smart now are you. Let's have the creator of this topic confirm my script. I believe my script is correct. Mines check if the wanted level is not greater than zero, so it's equal to or less than zero. You're saying the same thing that my script is doing, but you're providing the wrong code to do it. Check yourself before you check someone else. moto_whistle.gif

Link to comment
Share on other sites

{$CLEO}0000:while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if and           810F:   not player $PLAYER_CHAR wanted_level > 0           0AB0:  key_pressed 78       then           0109: player $PLAYER_CHAR money += 500000           wait 250       end   endend

 

 

For your understanding:

 

{$CLEO .cs}0000: NOP :Noname_2wait 0 if   Player.Defined($PLAYER_CHAR)else_goto @Noname_59 if and  not Player.WantedLevel($PLAYER_CHAR) > 0  Key.VirtualKeyCode(VK_KEY_N)else_goto @Noname_59 Player.Money($PLAYER_CHAR) += 500000wait 250 :Noname_59jump @Noname_2 

 

small mistake...

 

He Need if wanted level 0 , no if not wanted level 0 .

 

 

010F:   player $PLAYER_CHAR wanted_level > 0 

 

 

Thanks

He's right. CJ will be rewarded IF the wanted level is 0. So its expression:

 

if and          810F:   not player $PLAYER_CHAR wanted_level > 0

 

 

By the way I don't understand. I use both code syntaxes (either the simplified one than the opcodes one) and I don't know which syntax should be better.

 

I don't write in English very well. I hope you understand me homies. smile.gif

 

By the way I'll try the code tomorrow morning, cause right now I'm on my mother's netbook.

Link to comment
Share on other sites

By the way I don't understand. I use both code syntaxes (either the simplified one than the opcodes one) and I don't know which syntax should be better.

 

I don't write in English very well. I hope you understand me homies. smile.gif

 

By the way I'll try the code tomorrow morning, cause right now I'm on my mother's netbook.

The top code is scripted in high-level structure/construct. It's easier to understand and keeps the script more organized.

 

The bottom one is the top code, just the outcome of the decompiled script, which you may understand easier since you said you don't have that much coding knowledge.

Link to comment
Share on other sites

The script works. I tried the easy-to-understand code first, and he gave me a few errors during the compiling. With the better-organized code the script worked without problems.

 

Thanks a lot. I should read a few tutorials before attempting further attempts in scripting.

 

Thanks again.

 

edit: I've read the CLEO Tutorial by ZAZ (not all the thread).

 

 

{$CLEO .cs}:CarBuy034A: name_thread 'CARBUY':CarBuy_10001: wait 0 msif0AB0: key_pressed 74004D: jump_if_false @CarBuy_108D4: [email protected] = create_panel_with_title 'CHEAT7' position  340.0  120.0 width  240.0 columns  1 interactive  1 background  1 alignment  008DB: set_panel [email protected] column  0 header 'CARSHOP' data 'INFERNUS' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy'090E: set_panel [email protected] active_row 0:CarBuy_2wait 0if0256: player $PLAYER_CHAR definedjf @CarBuy_0if00E1: key_pressed 0 15jf @CarBuy_3jump @CarBuy_0 :CarBuy_3if00E1: key_pressed 0 16jf @CarBuy_103E6: remove_text_box08D7: [email protected] = panel [email protected] active_rowif0039: [email protected] == 0jf @CarBuy_4if and00FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point_on_foot 663.2672 -1856.4081 5.4609 radius 1.0 1.0 1.00247: request_model #ADMIRAL:CarSpawn0001: wait 0 msif0248: model #ADMIRAL available004D: jump_if_false @CarSpawnif80FF: NOT actor $PLAYER_ACTOR 0 ()near_point_on_foot 663.2672 -1856.4081 5.4609 radius 2.0 2.0 2.0004D: jump_if_false @CarSpawn01C3: remove_references_to_car [email protected]: jump @CarBuy_2:CarBuy_4if0039: [email protected] == 1jf @CarBuy_201B6: set_weather 4jump @CarBuy_2:[email protected] == 1jf @CarBuy_208DA: remove_panel [email protected]@ == 0jump @CarBuy_2

 

 

I want to spawn a red marker where, if CJ enters in it, a menu appears and if you choose an entry (for now just one) a car will spawn and you'll pay some money for that.

Edited by Zero94
Link to comment
Share on other sites

 

People should stop learning from low-level.
then we should write a high level tutorial

it isn't well documented in sanny help

people often decompile existing scripts and have no experience in coding

 

 

 

edit: I've read the CLEO Tutorial by ZAZ (not all the thread).

your menue script have a lot of failures

you should get more practice by writing small scripts

menue script is a bit difficult for newbies, study the lesson: Interactive MENUE

 

 

 

I want to spawn a red marker where, if CJ enters in it, a menu appears and if you choose an entry (for now just one) a car will spawn and you'll pay some money for that.

The parameter 1 of the near_point opcode 00FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point

is displaying a red marker (sphere).

If the parameter is zero 00FF: actor $PLAYER_ACTOR 0 (in-sphere)near_point does not displaying a red marker.

To display a red marker in this way needs to set 0 ms as maximum in the wait code of this Loop

 

{$CLEO .cs}:sphere034A: name_thread 'sphere':sphere_1wait 0if00FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point_on_foot 663.2672 -1856.4081 5.4609 radius 1.0 1.0 1.0jf @sphere_100BA: text_styled 'fem_ok'  1000 ms  4wait 1000jump @sphere_1

 

 

do you have experience in high level language?

would look then in this kind

 

{$CLEO .cs}:sphere034A: name_thread 'sphere'while truewait 0   if       00FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point_on_foot 663.2672 -1856.4081 5.4609 radius 1.0 1.0 1.0   then       00BA: text_styled 'fem_ok'  1000 ms  4       wait 1000   endend

 

Link to comment
Share on other sites

People should stop learning from low-level.
then we should write a high level tutorial

it isn't well documented in sanny help

I was writing little something for SCR... Well, actually, I was writing a huge manual. But more on that later wink.gif

Link to comment
Share on other sites

Michael-Knight1

No Need to write high level tutorial Zaz but just people can to learning that from programming language .

Anyways nice idea when you make this tutorial .

But i am sure sanny builder codes is easy.

 

Thanks icon14.gif

Edited by Michael-Knight1
Link to comment
Share on other sites

 

No Need to write high level tutorial Zaz but just people can to learning that from programming language  .

English:

Are you able to think? You're basically saying that everyone who wants to use high level code needs to learn another script/programming language. And high level is written in SB.

 

You're language:

you stupid. you say people need other programming to learn scm. and high level makes in sanny builder.

Link to comment
Share on other sites

Michael-Knight1

 

No Need to write high level tutorial Zaz but just people can to learning that from programming language  .

English:

Are you able to think? You're basically saying that everyone who wants to use high level code needs to learn another script/programming language. And high level is written in SB.

 

You're language:

you stupid. you say people need other programming to learn scm. and high level makes in sanny builder.

sorry , just sorry .

 

EDIT : i say that because i won't spam

Edited by Michael-Knight1
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
 Share

  • 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.