You are not logged in.
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
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
Offline
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.
Offline
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
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ÐOXON (04-01-2008 20:17)
Offline
2PARAÐOXON:
You mean, repeat the track forever until stop? OK, I'll try.
Offline
2PARAÐ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´t play the same track, as long as the play itself.
A overlapping would be useful function.
Last edited by PARAÐOXON (05-01-2008 17:49)
Offline
Hi,
I love Sanny Builder !!!!!!!!!!!!!
Have fun
Offline
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
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
Hey!
I have this question relating CLEO: Is it compatible with SA-MP or MTA? Thanks.
Offline
With SA-MP - yes; don't know about MTA.
Offline
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.
Offline
@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
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
Offline
Yes 10.0 is bigger than 8.0. And 20.0 is bigger than 10.0
Offline
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)
Offline
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!
Thanks.
Offline
Offline
@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
@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
@Rapier, @FunGt - Done. http://cleo.sannybuilder.com/cleo3.exe - an auto-installer of CLEO 3.
Offline
@Rapier, @FunGt - Done. http://cleo.sannybuilder.com/cleo3.exe - an auto-installer of CLEO 3.
Excellent :cookie:
Last edited by ZAZ (21-09-2008 17:30)
Offline