Quantcast

Jump to content

» «
Photo

PLZ! HELP

6 replies to this topic
saed123.
  • saed123.

    Player Hater

  • Members
  • Joined: 27 Nov 2011

#1

Posted 03 February 2012 - 02:27 PM

Im Beginner in Sanny Builder 3 What i do?
There is no Tutorials on youtube.

I dont now any codes.
sad.gif sad.gif sad.gif

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#2

Posted 03 February 2012 - 02:45 PM Edited by fastman92, 03 February 2012 - 03:12 PM.

Decompile data\script\main.scm, decompile scripts of other people (CLEO scripts .cs) and try to write something very simple, for example:

CODE
{$CLEO}
0000: NOP

:dumpscreen
wait 0
if
0AB0:   key_pressed 48   // press zero on left side of keyboard
else_jump @dumpscreen
0A1E: dump_screen 1
wait 500
jump @dumscreen


Virtual key codes here: http://msdn.microsof...y/ms927178.aspx

For a beginning you must have a clue what the "wait" opcode is:
QUOTE
WAIT opcode stops processing of the current thread and let the GTA SA to process other active SCM threads and execute different actions. The number specifies a minimum number of milliseconds of current thread inactivity. When number of milliseconds is less or equal to zero, then current thread will be executed as soon as possible. GTA SA stops the current thread, executes other actions and comes back to process this thread again until it finds WAIT command again.


Upgrade your opcodes.txt and SASCM.ini: http://gtag.gtagamin...opcode-database
CODE
Download Latest .ini
Download Latest opcodes.txt

Swoorup
  • Swoorup

    innovator

  • Members
  • Joined: 28 Oct 2008

#3

Posted 03 February 2012 - 02:47 PM

Also look on the article on SannyBuilding Help Window.

The coding bible is really helpful

saed123.
  • saed123.

    Player Hater

  • Members
  • Joined: 27 Nov 2011

#4

Posted 03 February 2012 - 02:57 PM

How to save my project as .cs or .scm

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#5

Posted 03 February 2012 - 03:15 PM

To make CLEO scripts, put at the beginning of source:
CODE

{$CLEO}

To compile script - press F6. .cs file will be compiled.

Also you may be surprised by "Jump to 0 offset".
Put e.g 0000: NOP before the label then.
It`s because you may not add anything before the first pointed label. BTW there are no labels in compiled SCM anyway. They are just negative offsets relative to the beginning of compiled script.

CODE
{$CLEO}
0000: NOP

:dumpscreen
wait 0
if
0AB0:   key_pressed 48   // press zero on left side of keyboard
else_jump @dumpscreen
0A1E: dump_screen 1
wait 500
jump @dumscreen

saed123.
  • saed123.

    Player Hater

  • Members
  • Joined: 27 Nov 2011

#6

Posted 03 February 2012 - 03:50 PM

But how to Learn The Scripting of control and models, time etc........

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#7

Posted 03 February 2012 - 04:03 PM

QUOTE (saed123. @ Friday, Feb 3 2012, 16:50)
But how to Learn The Scripting of control and models, time etc........

Decompile data\main.scm and see how R* did it in SCM.
It`d be better if you already started to look how it works instead of posting, really.
Also use opcode searcher to find a opcode. For time, type "time", "hour", "minute".

Part of my car spawner 2.1:
CODE
Model.Load(5@)
   
   while not Model.Available(5@)
   gosub @DisplayVehicleID
   wait 0
   end  
       
4@ = Car.Create(5@, 0.0, 0.0, 0.0)
0085: SpawnedTrailerHandle = 4@ // (int)
0893: put_trailer SpawnedTrailerHandle on_cab SpawnedVehicleHandle
Car.RemoveReferences(SpawnedTrailerHandle)
Model.Destroy(5@)      




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users