IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Hi @ All, please, can you help me

 How to describe, better you read
 
kiffz  
Posted: Friday, Apr 27 2012, 19:11
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 14, 2012

XXXXX



Hey guy, my Problem is, i do not understand, how to define Variables correctly, so now i built a Car Damage Reducer, but the Compiler f*cks me up.
Can you Help me please?

CODE

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
03A4: name_thread "DRED"



:DRED_1
0001: wait 0 ms
00D6: if
056D:   actor $PLAYER_ACTOR defined
004D: jump_if_false @DRED_1
:DRED_2
00D6: if and
0ADC:   test_cheat "DRED"
       Actor.Driving($PLAYER_ACTOR)
004D: jump_if_false @DRED_2
00BC: show_text_highpriority GXT 'CHEAT1' time 1000 flag 1  // Cheat activated
018C: play_sound 1058 at 0.0 0.0 0.0
:DRED_3
03C0: 0@ = actor $PLAYER_ACTOR car
if
not Car.Wrecked(0@)
jf @DRED_5
var
1@: Int
2@: Int
3@: Int
4@: Int
5@: Int
$s
 
   1@ = Car.Health(0@)
   wait 10 ms
   2@ = Car.Health(0@)
   wait 0
   if
       1@ < 2@
   jf @DRED_3
   3@ = 1@-2@
   wait 0
   4@ = 3@/2
   wait 0
   Car.Health(0@) = 2@+4@
   
:DRED_5
if or
   not Actor.Driving($PLAYER_ACTOR)
0ADC:   test_cheat "DRED"
   Actor.Dead($PLAYER_ACTOR)
  jf @DRED_3
  jump @DRED_2    
end
end_thread
PM
  Top
 

 
The_Sorrow  
Posted: Friday, Apr 27 2012, 20:05
Quote Post


Heaven, I'm in heaven(8)
Group Icon
Group: Members
Joined: May 31, 2010

en.gif

XXXXX



Anything coding related goes: Here

Moved - Adler

This post has been edited by Adler on Friday, Apr 27 2012, 23:55
Users WebsitePMMSN
  Top
 

 
Ashwin the new boy  
Posted: Saturday, Apr 28 2012, 02:19
Quote Post


I am The Most Confused Person
Group Icon
Group: Members
Joined: Nov 14, 2010

ia.gif

XXXXX



@kiffz
it not as other Programming language as C or C++,
Read some tutorial man
Users WebsitePM
  Top
 

 
Bad.boy!  
Posted: Saturday, Apr 28 2012, 09:02
Quote Post


SA modder
Group Icon
Group: Members
Joined: Jun 20, 2010

nl.gif

XXXXX



I don't know if you know a programming language already.Where you have to declare variables like this:
CODE
int CarHealth;
float Car_X_Coord;


You don't have to do that most of the time in Sanny Builder. Sanny Builder knows that this returns an int for example:
CODE
1@ = Car.Health(0@)


Also the right structure is:
CODE
var
   // Declare something
end //<-- important


This is impossible in scm coding.
CODE
Car.Health(0@) = 2@+4@

You'll need to do this.
CODE
2@ += 4@
Car.Health(0@) = 2@


And use low structures or high structures:
CODE
//Low
:MAIN4
wait 0
if
Player.Defined($PLAYER_CHAR)
jf @MAIN4
wait 100
Player.InfiniteRun($PLAYER_CHAR, true)
0A93: end_custom_thread

//High (1)
:MAIN3
wait 0
if
   Player.Defined($PLAYER_CHAR)
then
   Player.InfiniteRun($PLAYER_CHAR, true)
   0A93: end_custom_thread
else
   jump @MAIN3
end

//High (2)
:MAIN2
while true
   wait 0
   if
       Player.Defined($PLAYER_CHAR)
   then
       Player.InfiniteRun($PLAYER_CHAR, true)
       0A93: end_custom_thread
   end
end


And don't forget to use wait 0 in loops
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG