#26 29-11-2007 14:02

Midnightz
From: U.S.
Registered: 26-08-2007
Posts: 39
Website

Re: Sanny Builder / CLEO discussion

Ahh, so THAT'S what a pointer is?  Been wondering for awhile and thanks for elaborating on why I need it too.

As for my problem, the script is finished otherwise and working nicely.  I wasn't stating the problem as clearly as I should have = actually it's (after that code) opcode 0836 using $9811 that is causing crashes.  Is it because I am trying to manipulate it?  This is a repeat issue in several of my CLEO scripts - anytime I need to manipulate the value or write a new value = crash.  Uhh, I need a work-around or alternative approach?   

2 pseudo-code examples:

check $scmvar
is $scmvar value 1?
if not value 1, cancel
otherwise, continue

check $scmvar
is $scmvar doing X?
if not doing X, cancel
otherwise, do X faster

^...effects I need for my CLEO scripts to function properly. 

Thanks in advance for any advice/guidance,
-Midnightz

Offline

#27 01-12-2007 12:21

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

Ahh, so THAT'S what a pointer is?  Been wondering for awhile and thanks for elaborating on why I need it too.

http://en.wikipedia.org/wiki/Pointer

I wasn't stating the problem as clearly as I should have = actually it's (after that code) opcode 0836 using $9811 that is causing crashes.

If you will post the whole script, we will probably solve your problem much faster wink

Offline

#28 01-12-2007 15:06

Midnightz
From: U.S.
Registered: 26-08-2007
Posts: 39
Website

Re: Sanny Builder / CLEO discussion

What I meant is...  I may understand the definition of something and its general purpose but I may not always see right away how they assimilate with GTA SA coding.  See: http://ardictionary.com/Assimilating/9610
Once I can see how it applies (when you elaborated), I can then incorporate it.  Uhh, make sense?

The whole script?  Ugh...  they are several for each mod until finished with each section, then I plan to combine.  I'll PM to save the space, thanks.  smile

Offline

#29 01-12-2007 15:37

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

Weeeel, in coding (or programming) there could be a function that takes a string (a set of characters, you know) as a parameter.

function Print(S)
begin
 ShowTextBox(S)
end

Assuming the S is a string parameter, you could call this function doing

print('Hi!')

And it will display the textbox containing 'Hi!'.

(the all above is a pseudo-code).

Without going into details, the parameters of a function have to be numeric. But this function takes a string, which is not a number. How to pass it? We could not pass a whole string (whole set of chars), but could pass a POINTER to it, i.e. address in memory where this set begins. The function takes this pointer, knowing that this is an address of a string and acts accordingly (for example, when you compare a string parameter to another string, it takes this address, reads first char (byte) at this address, compare, reads second, etc). When you deal with number parameters it just compares it. In fact, the pointers can be used not only for the string, but for any of data types (numbers, classes, functions, etc).

So, how it assimilates with GTA SA coding? In common SCM coding - in no way, as there is no home-made pointer manipulating opcodes or ways to use them. But when you deal with the advanced techniques, such as calling exe functions via CLEO opcodes, you probably may need to pass a STRING to it. How? Using pointer, as it is the way the exe function expects to get a string in. If you re-read posts #10-11 here, you will see what I'm talking about.

Offline

#30 01-12-2007 17:03

Midnightz
From: U.S.
Registered: 26-08-2007
Posts: 39
Website

Re: Sanny Builder / CLEO discussion

*nod* I see.  smile  Thank you for explaining a bit more.  Did you get my PM from here the other day?  Well, I will PM from somewhere to show you the problem with the global DMA vars.

Offline

#31 04-01-2008 19:55

PARAÐOXON
Registered: 03-01-2008
Posts: 4

Re: Sanny Builder / CLEO discussion

Hi Seemann.

It is possible to add a parameter at 0AAD ?

Example:
0AAD: set_mp3 $hMP3 perform_action 1
This opcode performs the pre-defined action with the loaded mp3.

Parameters:
1 – mp3 handle obtained by 0AAC
2 – a number to specify an action:
  0: stop
  1: play
  2: pause
  3: resume
  4: overlap <--- usefull for short sound or other things

...regards, PARA

Last edited by PARA&#208;OXON (04-01-2008 20:17)


[SB-CLEO|PlugIn] SA-DevTool

...you seen this video? CLICK

Offline

#32 05-01-2008 15:04

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

2PARA&#208;OXON:
You mean, repeat the track forever until stop? OK, I'll try.

Offline

#33 05-01-2008 17:39

PARA&#208;OXON
Registered: 03-01-2008
Posts: 4

Re: Sanny Builder / CLEO discussion

Seemann wrote:

2PARA&#208;OXON:
You mean, repeat the track forever until stop? OK, I'll try.

I have to wait while it playing, if I play a track.
I can&#180;t play the same track, as long as the play itself.
A overlapping would be useful function.

Last edited by PARA&#208;OXON (05-01-2008 17:49)


[SB-CLEO|PlugIn] SA-DevTool

...you seen this video? CLICK

Offline

#34 18-01-2008 19:57

tomworld10
Registered: 18-01-2008
Posts: 1

Re: Sanny Builder / CLEO discussion

Hi,



I love Sanny Builder !!!!!!!!!!!!!


wink


Have fun

Offline

#35 07-05-2008 01:27

RaH
Registered: 02-05-2008
Posts: 3

Re: Sanny Builder / CLEO discussion

I've seen the thread about Key values for key_pressed and such, but I've found nothing relating to a value for key_pressed but relating to a joystick button. Is there anything out there?

Offline

#36 07-05-2008 08:41

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

You can find the key_pressed numbers in SB Help (press F12) -> SCM Documentation -> GTA SA -> Keypress numbers topic.
To check the joystick buttons, you must use 0494 opcode.

Offline

#37 24-05-2008 15:47

BReal
Registered: 24-05-2008
Posts: 1

Re: Sanny Builder / CLEO discussion

Hey!

I have this question relating CLEO: Is it compatible with SA-MP or MTA? Thanks.

Offline

#38 24-05-2008 19:02

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

With SA-MP - yes; don't know about MTA.

Offline

#39 12-06-2008 17:39

biosim
From: Rio de Janeiro - RJ
Registered: 12-06-2008
Posts: 3

Re: Sanny Builder / CLEO discussion

Hi!, can someone tell me how can i put an especific hour to something happend? For exemple, in 23:00 pm, Sweet will apper in the Groove Street.


sanandreasuserbarzn7.jpg
dantemu4.jpg

Offline

#40 13-06-2008 06:45

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

@biosim -

:SWEETL
thread 'SWEETL'

:loop
wait 250
00BF: 0@ = current_time_hours, 1@ = current_time_minutes
if
 0@ == 23 // 23pm
jf @loop
023C: load_special_actor 'SWEET' as 1 // models 290-299

:load
wait 0
if
023D:   special_actor 1 loaded
jf @load
009A: 2@ = create_actor_pedtype 24 model #SPECIAL01 at 2518.07 -1668.82 12.85
0187: 3@ = create_marker_above_actor 2@ 

0296: unload_special_actor 1
end_thread

Offline

#41 14-06-2008 10:37

biosim
From: Rio de Janeiro - RJ
Registered: 12-06-2008
Posts: 3

Re: Sanny Builder / CLEO discussion

Oohh, thnks man, now i see where i make a mistake...

Can i ask something else? The variable of "radius", if i put just like this:

radius 10.0 10.0 10.0

Will be bigger than:

radius 8.0 8.0 8.0

Am i right?

PS: Sorry of the dumb questions, im new in this thing of programming grin


sanandreasuserbarzn7.jpg
dantemu4.jpg

Offline

#42 14-06-2008 11:01

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

Yes 10.0 is bigger than 8.0. And 20.0 is bigger than 10.0

Offline

#43 15-06-2008 03:48

biosim
From: Rio de Janeiro - RJ
Registered: 12-06-2008
Posts: 3

Re: Sanny Builder / CLEO discussion

Man one last tip plz (Sorry about all those questions)

If i wanna that a Pedestrian apper in a certain place, just stand still and 1 second later, he disapper, what command that i use to make he apper and stay stopped?

exemple: A pedestrian apper inside the house of CJ, and 1 second later, he disapper.

I'll be grateful for any help!!!

Last edited by biosim (15-06-2008 04:12)


sanandreasuserbarzn7.jpg
dantemu4.jpg

Offline

#44 21-07-2008 07:08

Rapier
Registered: 28-04-2008
Posts: 29

Re: Sanny Builder / CLEO discussion

Hello! There is how to create new cheats? In other words, the mod is running but the effect is reproduced only if you enter the combinations of words. Is there any topic that speaks more deeply about this, because I am very interested! smile

Thanks.

Offline

#46 03-08-2008 17:51

Rapier
Registered: 28-04-2008
Posts: 29

Re: Sanny Builder / CLEO discussion

@Seemann: This is about CLEO Library update(s)/installation. Would not it be better to make a autoinstaller to install the CLEO library or to make updates? I think that the Inno Setup is capable to open the SASCM.INI and write the new opcodes, update files or something like. It is only an idea but certainly would be more professional and more practical too.

Offline

#47 05-08-2008 10:36

FunGt
Registered: 22-06-2008
Posts: 2

Re: Sanny Builder / CLEO discussion

Rapier wrote:

@Seemann: This is about CLEO Library update(s)/installation. Would not it be better to make a autoinstaller to install the CLEO library or to make updates? I think that the Inno Setup is capable to open the SASCM.INI and write the new opcodes, update files or something like. It is only an idea but certainly would be more professional and more practical too.

I agree.

Offline

#48 23-08-2008 09:56

Seemann
Registered: 07-08-2006
Posts: 2,050

Re: Sanny Builder / CLEO discussion

@Rapier, @FunGt - Done. http://cleo.sannybuilder.com/cleo3.exe - an auto-installer of CLEO 3.

Offline

#49 17-09-2008 18:11

ZAZ
Registered: 05-12-2007
Posts: 55

Re: Sanny Builder / CLEO discussion

Seemann wrote:

@Rapier, @FunGt - Done. http://cleo.sannybuilder.com/cleo3.exe - an auto-installer of CLEO 3.

Excellent goodclap :cookie:

Last edited by ZAZ (21-09-2008 17:30)

Offline

#50 17-09-2008 19:07

3Doomer
From: КаZан
Registered: 14-05-2008
Posts: 659
Website

Re: Sanny Builder / CLEO discussion

Also, it's a good idea to make an auto-installer of Quick Opcode.


GIMS developer

Offline

Board footer

Powered by FluxBB