Help with freezing SAMPFUNCS C++

malonex

Member
Joined
Nov 22, 2023
Messages
13
Solutions
1
Reaction score
2
Location
London
Hello, friends! Why does SA-MP freeze for a while and then return to normal when I try to use Sleep(1000);?


I already tried to use Getticickcount, but I didn't like the function
 

SobFoX

Expert
Joined
Jul 14, 2015
Messages
1,473
Solutions
5
Reaction score
919
Location
Israel
Glad my post managed to entertain you. If you want to use this energy to something more productive, I can give you the problem again, maybe you have something useful to tell a newbie C ++.
Yes, you will learn to use a function even if you don't like it, this language is not lua

There is a huge difference between those languages, ask ChatGPT
He will be happy to explain to you.
 

malonex

Member
Joined
Nov 22, 2023
Messages
13
Solutions
1
Reaction score
2
Location
London
Yes, you will learn to use a function even if you don't like it, this language is not lua

There is a huge difference between those languages, ask ChatGPT
He will be happy to explain to you.
Dude, it's not about liking or disliking the function, it's about understanding what's going on in the code. If you don't have anything useful to contribute, it's better not to comment. Otherwise, feel free to help, I'd appreciate it 🤙🏽
 

SobFoX

Expert
Joined
Jul 14, 2015
Messages
1,473
Solutions
5
Reaction score
919
Location
Israel
Dude, it's not about liking or disliking the function, it's about understanding what's going on in the code. If you don't have anything useful to contribute, it's better not to comment. Otherwise, feel free to help, I'd appreciate it 🤙🏽
You wrote that you don't like it. Let's start with this.
Maybe instead of talking nonsense here like you do, you should ask gpt how is work and To give you an example of using it with a timer
 

SIGKILL

Active member
Joined
Apr 29, 2020
Messages
40
Reaction score
24
Location
Earth
Don't use Sleep to delay execution of code. Instead look up what Sleep actually does and you'll find your answer as to why the game freezes.
 
Top