I want to make an input dialog (style 1) in which a command will be typed. How much memory do i need to allocate in order to store that command in a .ini file?
@Parazitas do you know if there is any way to tell that key as letter / digit? So if I press '1' I will display 1 in chat, if I press 'A' it will display A in chat. If you don't know that okay, you've helped me enough anyways.
Yeah, I was gonna ask... What does 1@ *= 2 and 1@ += 0xB72CC8 do.. Is there a condition they must meet?
Edit: Also, I wish only numbers and letters to work so it's not TOO confusing with which keys work and don't work if that's possible. @Parazitas.
I want to make a keybinder. And I want to be able to modify the keys from the game. I need to know which key I pressed. If I type '/keybind' a dialog comes up which I enter the text I need. After I submitted that, the chat says 'press the key you want this bind on'. Once the key is pressed, it...
Hey, I've been thinking of a cleo however im not sure how to get the key that has been pressed. So if i press 'F' the key will appear in chat. I don't want to write 'if key_down {key}' for every existing key. Is there any way to make it quicker and cleaner?
Why do you want that structure..? It's useless and the one I gave you it's simpler as Hidend said. Make your life easier. Using jump to other labels it's more complicated and a higher chance of getting something wrong.
{$CLEO}
{$INCLUDE SF}
0000:
thread "Keybinder"
repeat
wait 0
until SAMP.Available()
WHILE TRUE
WAIT 0
IF key_down 35
THEN
say "/stats"
END
IF key_down 36
THEN
say "/vehicles"
END
END
This should work.
if
06BD: no_obstacles_between 7@ 8@ 9@ and 10@ 11@ 12@ solid 1 car 1 actor 1 object 1 particle 1
86BD: not no_obstacles_between 1@ 2@ 3@ and 4@ 5@ 6@ solid 1 car 1 actor 1 object 1 particle 1
else_jump @WALLRUN_761
wait 0
It should be
IF <conditions>
THEN
You forgot about 'Then'.
U can either make a command setting a variable to 1. Add that variable to the 'IF AND' statement then at the end of the teleport is set to 0. That way, you can just start it again and again.
I am confused about what you are trying to do. So you want to have an interval of 1minute between teleportations?
+ u have one command for 2 labels.. im not sure if thats a mistake or not
HI! So I have been testing a few opcodes to see if i could automatically turn on the lights however, i have noticed that they are only turned on for me, not for the server i play on. The point is to set the car lights on while im in the car. The lights shouldnt be turned off at any time unless...
So I need a command that can take multiple parameters. I'm not 100% sure how to make this but im certain that what i've tried isn't working. Imagine you have a command [/test <string> <integer>]. String beind either 'info' showing a dialog or 'start' which then requiers you to also enter an...
Hi! I've made this car warning kind of thing for taxi drivers. Once it is lower than 500, it will put a warning in chat (chatmsg "warning" -1) however when i get in the car, i get lots of errors in chat then crash. May someone help?
// repair warning
IF AND
25@ == 1
0602: actor...
This might be useful however im not totally sure how to use call functions.. ive never been thought by anyone nor have needed this skill. Would you mind helping me figure out if there is an active checkpoint then chatmsg "active checkpoint" else chatmsg "no active checkpoint"
Hi. How can I check for active checkpoint? I have only found a few opcodes that only create and other few things but not what i need. Can someone help me please?
Here you go @Parazitas []. The problem I have faced doing this is, the player has a [TAG]. So you must remove that [TAG] first. The thing is, the user must put the [TAG] first in an .ini file or something to know exactly what to remove from the name. This is how the [TAG] of my clan look like. [].
So my aim is to select the 1st/2nd/3rd/4rd item of the dialog '/clan' which is a server dialog. The problem is that none of the commands dont work... which im not sure why.. Can anyone help please?
{$CLEO}
{$INCLUDE SF}
0000:
thread "ClanCMD"
repeat
wait 0
until SAMP.Available()
chatmsg...
@HowEnCokkien what do you mean by rpcs, nop etc? I'm quite sure those are keywords that beginners may not know. Would you mind explaining it? Also, he asked for deleting the message in the chat, you gave him an example of automatically replying to a certain message in the chat. I may have got...
I think i could help but i need a bit more details. Do you have a video of the process? Also what is the command to accept your customer? Please explain in more detail.
Complicat... uhm.. Sa fie un dialog ca si lista si sa fie:
Players Online: (header)
Police Departament: (numar de politisti on)
Taxi: (taximetristi on)
Paramedic Departament: (paramedici on)
School Instructors: (instructori on)
Daca selectezi una dintre ele, sa arate fiecare nume, tot intr-un...
So i'd work if in 1.cs I would create a dialog with a list of items. If one of them is pressed, it will say a command which will be created in 2.cs. That should work right? I'm trying it now. Thank you so much.
So I have a script with multiple ideas but to be neater, i wish to make 2 .cs files that could link to a common dialog. For example in 1.cs i have /servercmd (example) and if it will choose the 2nd item it will activate 2.cs continuing with the script from the 2nd .cs file. Is that possible?
E mai usor dar eu vreau sa invat mai multe… Stiu ca tii se pare o prostie sa invat pt nimic.. totusi e samp si nu ajuta cu nimic, dar eu vreau sa invat cat se poate de mult + ca mi se pare o idee destul de buna. Ma poti ajuta?
So I've thought of this idea of writing a specific message from the game. What i need exactly is the dialog box with the list of strings added throughout the game. The proccess is:
> Type command [/list] (example)
> Show the empty dialog with 2 buttons ADD and CLOSE
> When press CLOSE, close...
Hello again. I've tried to make this fancy way of writing a string into a .ini file instead of just making a boring command however it doesnt work very well.
0B34: "acommand" @acommand
WHILE TRUE
WAIT 0
IF SAMP.DialogRespond(1000, 2@, 0, 3@)
THEN
IF 2@ == 0
THEN...
So I've tried to make this cool autoclicker however it doesn't respond when i type the text in the chat... anyone knows why? Also, how would i test for the colour of the text too?
{$CLEO}
{$INCLUDE SF}
0000:
thread "AutoClicker"
repeat
wait 0
until SAMP.Available()
0B34: "autoclicker"...
@Parazitas the thing is, i want to make a message that wont appear in chat but also it will appear somewhere on the screen then after 5-6 sec it will disappear. Thats why i thought of a text box
So I've tried to make a textbox once the whole script has been running but when i test it in game, nothing happens.
alloc 2@ 260
0B75: samp get_chat_string 99 text_to 2@ prefix_to 3@ color_to 4@ prefix_color_to 5@
if or
4@ == 0xffffd700
4@ == 0xff4dad2b
then...
Hi! So I know there are more types of "Titles" for example chatmsg, printstring, etc.
Does anyone know how many there are and how they look like? Or if there is a link to such a thing? Thanks a lot!
@Parazitas ok so the crash its gone, it was indeed from the chat message but now theres another problem... Bcoz there is another $ that says the amount that u have transferred or deposited, it writes the whole string... do u know how i can fix that?
So I've done this code, with the help of one of the members of this community, BUT it doesn't work rlly well and it crashes. I'm not sure if i need to allocate any memory or anything. Can someone help?
--> Here's some videos to show the problem
- /balance (it writes the right value in .ini file...
Yeah.. If i'd use that "logger" in my script. How will it help and how do I need to use it. I'm sorry but I don't quite get it... If I put that script it will check the speed of my car on the server?
Well firstly you could use 0C14 and as you type /pass <password / register>. Register can be used in case the player doesn't have a password set yet, after the player registers their password, write it to an .ini file. Then when you type /pass <password> you have to get the string from a .ini...
Can you exaplain a bit more what this "logger" does? Just so I know because from 02E3: 1@ = car 0@ speed I am getting a bit confused. What is opcode 0AD1, what does it do, what is %f and what is the 1337 for? I get the 1@ is the car speed, but the rest?
So what I've tried to do is to get the value from the chat and write it in .ini file.
This is the string : Your account balance is now $25.255.525. It doesn't work. It just gives a lot of errors then crashes.
alloc 2@ 260
0B75: samp get_chat_string 99 text_to 2@ prefix_to 3@ color_to 4@...
So I've been trying to get the car's speed in order to make a limiter, if that makes sense, although it doesn't work and i dont really find the mistake.. Can someone help please?
0AF0: 5@ = get_int_from_ini_file "cleo\ServerCMD.ini" section "AntiTicket" key "states"
0AF0: 7@ =...
So in .ini file I put the value $2.500.512 and i made a dialog in which it would show the value. Here's the code
if and
20@ == 1
21@ == 2
then
0AC8: 29@ = allocate_memory_size 75
0AF4: 29@ = read_string_from_ini_file "cleo\ServerCMD.ini" section...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.