Auto /getmats entering a specific zone

Status
Not open for further replies.

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
I need a cleo that when I enter a specific zone, it types /getmats automatically. I also want the time difference between /getmats cmd to be as small as possible, like when you type in your cleo script ''wait number''. The specific zone should look like the attached picture but in a rectangular way. If you connect the coordinates I attached, you will find that they make a rectangular zone. SO WHAT I WANT IS: When I enter this zone, /getmats is typed automatically with a small amount of time between repetitions and it doesn't have to appear like a red checkpoint in my game, just let it transparent as if nothing exists. In order to complete though, the height of this zone should be like the picture attached down, no matter how you see or conclude it.
 

Attachments

  • coord.txt
    295 bytes · Views: 14
  • sa-mp-001.png
    sa-mp-001.png
    642.5 KB · Views: 27

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
try this
 

Attachments

  • auto_getmats.cs
    17.9 KB · Views: 26

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
Well, I know I asked for the smallest time possible, but this gets me muted for spam. Please lower the time between the commands not a little bit. Just try 0.5 seconds between each. Also, would be nice if you added /solo as an activation/deactivation cmd.
 
Last edited:

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
copy files to cleo
on/off use- /matson
change delay in ini file in milliseconds

[Settings]
delay=1000
 

Attachments

  • auto_getmats.zip
    7.3 KB · Views: 20

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
copy files to cleo
on/off use- /matson
change delay in ini file in milliseconds

[Settings]
delay=1000

So the current delay is 1000 milliseconds?
Edit: I tried it and it's buggy. It doesn't always type and why it's restricted to me being in a vehicle? The first one was perfect can I use the first one with the .ini file?
 
Last edited:

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
change the delay if necessary

error try this works on the vehicle or outside the vehicle
 

Attachments

  • auto_getmats.zip
    7.3 KB · Views: 9

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
Look, can you put the coordinates I asked for, forming a rectangular instead of the coordinates in the file attached. Also, make me a file to set the delay and that would be absolutely fine.
 

Attachments

  • auto_getmats-0.3.7-v2.cs
    18.7 KB · Views: 13

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Look, can you put the coordinates I asked for, forming a rectangular instead of the coordinates in the file attached. Also, make me a file to set the delay and that would be absolutely fine.
Simply use this opcode...
Code:
00A3:   actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA 2037.536 2365.373 cornerB 2117.177 2483.922
you used /save so clearly have knowledge of coordinates which means you have the means to do this yourself.
Oh and the delay should be quite simple just add "wait [millesconds]" after the say function. No need for a file just to determine 1 var just open the CLEO and change the "wait" anytime you want to change the delay.
 

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
Simply use this opcode...
Code:
00A3:   actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA 2037.536 2365.373 cornerB 2117.177 2483.922
you used /save so clearly have knowledge of coordinates which means you have the means to do this yourself.
Oh and the delay should be quite simple just add "wait [millesconds]" after the say function. No need for a file just to determine 1 var just open the CLEO and change the "wait" anytime you want to change the delay.
Okay so...
I opened the last cleo I sent, removed all the coordinates and put that one you gave me.
BUT!!! when I changed the number next to ''wait'' and I HAVE DONE this before on other cleos, the game crashes after the bar loads and I know it's because of that. PRETTY sure it is and THATS WHY I came to ask here in the first place. So, it would be nice if you do it for me.
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Okay so...
I opened the last cleo I sent, removed all the coordinates and put that one you gave me.
BUT!!! when I changed the number next to ''wait'' and I HAVE DONE this before on other cleos, the game crashes after the bar loads and I know it's because of that. PRETTY sure it is and THATS WHY I came to ask here in the first place. So, it would be nice if you do it for me.
You probably interfered with the mandatory "wait" for the loop not the command, you need to add that yourself after the say. Like just actually read what I put, If you really wanted this you'd actually try your best to get it.
 

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
You probably interfered with the mandatory "wait" for the loop, not the command, you need to add that yourself after the say. Like just actually read what I put, If you really wanted this you'd actually try your best to get it.
Well, I'm sure after ''end'', there's ''wait'' and that's the one that should be edited to repeat right? Well, it crashes the game anyways. There's also one after the line thread 'BoatGM' and I edited it. It was 5000 milliseconds which is 5 seconds which I'm sure not the amount of time I get in-game, but I did edit and also crashed. There's another one but 0 milliseconds which I don't want to edit because it's fine anyway. So, I'm editing blindly using a notepad and my game crashes and then you say I could try my best. Well, give me a hint at least. I'm guessing it should be re-compiled using a program that I don't know about because MAYBE editing by notepad isn't working?
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Yeah use sannybuilder 3 (look up anything about developing CLEOs) and all those "waits" you just mentioned are mandatory to prevent crashes as certain things can't be done until the game is loaded in, like I said you need to ADD your own delay as there isn't one after the say function.
 

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
Yeah use sannybuilder 3 (look up anything about developing CLEOs) and all those "waits" you just mentioned are mandatory to prevent crashes as certain things can't be done until the game is loaded in like I said you need to ADD your own delay as there isn't one after the say function.
I appreciate you trying to make me learn, but I came here to request something and sadly it took so long while it's easy. I will try to do what you said though. How is there's no ''wait'' after the say function when in-game the cmd repeats itself every 2 seconds?
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
I appreciate you trying to make me learn, but I came here to request something and sadly it took so long while it's easy. I will try to do what you said though. How is there's no ''wait'' after the say function when in-game the cmd repeats itself every 2 seconds?
Because each loop is repeated with that wait for some reason for that period, it shouldn't be like that but the creator might have had to do it for some reason. He probably didn't need to add that but you said that changing it crashes the game so that might be why I mean using nonsampfuncs always has to be awkward.
 

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
Because each loop is repeated with that wait for some reason for that period, it shouldn't be like that but the creator might have had to do it for some reason. He probably didn't need to add that but you said that changing it crashes the game so that might be why I mean using nonsampfuncs always has to be awkward.
I found problems on the way which led to me putting SB_data, a folder in sampfuncs.zip into my sanny builder's folder. I managed to change the delay of the file attached, but I tried putting your coordinates and the other guy's coordinates and none of them worked. My compiled file is attached. Also, I had to remove the ''or'' function because your coordinate line was only one so congratulations to me.
 

Attachments

  • auto_getmats-0.3.7-v2 (1)[0].cs
    17.9 KB · Views: 7

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Did you really not think to change those coordinates? That was just example syntax from opcodes.txt you need to put your own coordinates in.
 

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
Well, even if it's not and I was dumb to think that you put mine in it. The coordinates of the other guy didn't work.
 

Attachments

  • auto_getmats-0.3.7-v2 (1)[0] (1).cs
    18.2 KB · Views: 1

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
Well they do work just the radius is probably too small. Just do the coordinates yourself use the rectangle opcode.
 

PetroGV

Member
Joined
Feb 10, 2020
Messages
18
Reaction score
1
Location
lebanon
Simply use this opcode...
Code:
00A3:   actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA 2037.536 2365.373 cornerB 2117.177 2483.922
As I see here, 2 coordinates in Corner A, 2 in corner B. Is that for X or Y? What about height? Z?
Edit: I tried and this is the final script and it's not working ffs.
 

Attachments

  • auto_getmats-0.3.7-v2 (1)[0] (1).cs
    17.9 KB · Views: 5
Last edited:

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
XY why would Z matter that's just height it's a square not a cube.
 
Status
Not open for further replies.
Top