Ok, i really don't want to make another task that will remove another task and so on.
So here is the code
PHP Code:
public MinorPot(id)
{
id -= 15031
set_user_health(id, get_user_health(id) + 1)
set_task(0.2, "MinorPot", id + 15031)
if(get_gametime() >= 20)
{
remove_task(id + 15031)
client_print(id, print_chat, "[Mod] Healing done. Just a test msg to know :)")
}
}
Its actually a health pot I've been making for some shop menu, but since this check i did kinda checks if the 20 seconds passed since the server / map started, it doesn't really work...
This pot should actually heal for the first 20 seconds after buying (100hp if you done the math), and then stop healing, and message should pop out, which i only put for testing...
So how do i use get_gametime() correctly, and any advices about get_gametime() ??
I really appreciate your help, Thank You!
__________________