ItsRobinson
Active member
- Joined
- Nov 16, 2017
- Messages
- 105
- Reaction score
- 20
So basically I have a section of code inside my while true loop that is supposed to check if a variable is less than 3, if it is then delete a textdraw if it matches the specific criteria, it is only supposed to do this 3 times.
(Basically trying to delete 3 textdraws that make up a server-side healthbar on HZG)
I could delete them via the textdraw specific ID's, but as I have tried that before, the IDs changed on rare occasions. So it isn't an option, the textdraw isn't a valid character either so I can't use the exact string match.
If I'm not wrong, this should try and execute this until the 3@ = 3, however, if I don't log in quick enough, it stops looping this, as you can see in the video below.
Any ideas?
(Basically trying to delete 3 textdraws that make up a server-side healthbar on HZG)
I could delete them via the textdraw specific ID's, but as I have tried that before, the IDs changed on rare occasions. So it isn't an option, the textdraw isn't a valid character either so I can't use the exact string match.
PHP:
while true
wait 0
if
3@ < 3
then
alloc 2@ 125
FOR 1@ = 0 TO 2500
0C5A: samp textdraw 1@ get_string_to 2@
0C17: 0@ = strlen 2@
if 0@ < 2
then
if
0C14: strcmp string1 2@ string2 "'"
then
continue
else
0C5E: samp textdraw 1@ delete
000A: 3@ += 1
end
end
END
free 2@
end
//rest of my code follows
If I'm not wrong, this should try and execute this until the 3@ = 3, however, if I don't log in quick enough, it stops looping this, as you can see in the video below.
Any ideas?