CLEO Help CLEO & Sampfuncs

CLEO related
Status
Not open for further replies.

Spartan_239

New member
Joined
Feb 11, 2014
Messages
1
Reaction score
0
So I am trying to learn scripting with CLEO and it isn't ending very well at the moment. At the moment this is my code:
Code:
{$CLEO .cs}
:EGG
03A4: name_thread "MREGGMAN"
wait 1000


//check if samp is running
/*
if not 1@ = SAMP.Base()
then 0A93: end_custom_thread
end
  
while not 1@ = SAMP.Available()
    wait 100
end
  */
if
0256:   player $PLAYER_CHAR defined
03CA: object 19341 exists
then
00BA: text_styled 'FEM_OK'  1000 ms  1
end

I intend for it to say "OK" if it can find object 19341 and nothing if it cant for now.
The main trouble I am having is with sampfuncs. I honestly have no clue what I am doing and have tried googling around for the past few hours but cant find anything about sampfuncs and cleo development. I found the
Code:
if not 1@ = SAMP.Base()
then 0A93: end_custom_thread
end
  
while not 1@ = SAMP.Available()
    wait 100
end
somewhere in my adventures but these aren't allowing it to compile and I have looked through opcodes.text and found
Code:
0AF7: samp 1@ = get_base
0AFA:  is_samp_available
But I don't really know how to make that shit work for me.

So simply put, how can I get it to detect if it is running SAMP and it is available (as the code says) in sampfuncs 3.0?

EDIT: For future reference, I am not new to the scripting scene, I am an experienced scripter in pawn and currently script for a well known SAMP server.

Thanks,
Spartan_239
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
You need to download sampfuncs sanny builder data http://ugbase.eu/releases/(plugin)-sampfuncs-3-1-by-fyp-(0-3z)/ download the 3.1.2 rar, inside it there's a folder named SB data, copy those files to your sanny builder install folder data/sa folder.

In the new sampfuncs version you don't need to load sampfuncs anymore(make use of 0AFA), so just add a wait 1000 in the header and the continue with your codes.

Opcode 03CA checks if the object handle is true, first you need to get the object handle either using a objectPool search function or 0AE3.
 
Status
Not open for further replies.
Top