Perfect timer for.. [+REP]
#1

Hello

I want to do a system, that in every 24hours system changes specific variable to "50". What is good system to do that? Give me good solution, please.

Thanks,
Larry
Reply
#2

its simple use this:
pawn Код:
forward ch();

public OnGameModeInit()
{
    print("Starting timer...");
    SetTimer("ch", 240000, false);
}
 
public ch()
{
    //code here
}
Reply
#3

You can use my function here http://forum.sa-mp.com/showpost.php?...postcount=3631 it is helpful in your situation..
Reply
#4

XtremeR -- But what happens when i restart my server before 24h? Then the variable doesn`t change.

Glint -- Can you give some examples? I didn`t understand very well.
Reply
#5

Can you tell me what you want to do in more detail so i can help you more.
Reply
#6

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
its simple use this:
pawn Код:
forward ch();

public OnGameModeInit()
{
    print("Starting timer...");
    SetTimer("ch", 240000, false);
}
 
public ch()
{
    //code here
}
Thats 4 minutes not 24 hours... http://*******/OrkQVx there, click it to see what 24hours is in milliseconds
Reply
#7

I want to do a NPC, which has a variable(weed seeds) "50" in every 24hours.
Reply
#8

Quote:
Originally Posted by Larry123
Посмотреть сообщение
I want to do a NPC, which has a variable(weed seeds) "50" in every 24hours.
Sorry i still didn't understand you :P, you mean the NPC will gain 50 Weed Seeds every 24 hour ?
Reply
#9

Quote:
Originally Posted by Larry123
Посмотреть сообщение
I want to do a NPC, which has a variable(weed seeds) "50" in every 24hours.
Wait now I'm confused, does the NPC have 50 (weed seeds) every 24hours?
Reply
#10

Glint, that's right
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)