continuing a timer?
#1

I want to know how to continue a timer, such as when you /jail or for a paycheck?

And I don't want to use the gettime function.
Reply
#2

Either you can set a repeated timer or you can call the function every second and make it limited but yet repeated.

1. Setting a Repeated Timer without limits.
pawn Код:
forward function();

SetTimer("function", 1000, true); // Set a repeated timer of 1000 miliseconds (1 second)

public function()
{
    print("Function has been called.");
}

2. Setting a repeated timer with limits.


pawn Код:
forward function(numb);

new no =  20;
new Timer = SetTimerEx("function", 1000, true,"d",no); // Set a repeated timer of 1000 miliseconds (1 second)

public function(numb)
{
    if(numb == 0)
    {
        KillTimer(Timer);
    }
    print("Value:%d");
    numb--;
}
Reply
#3

LolWut?

Can you tell me how I'd make a payday system and the timer would continue when the player logs in?
Reply
#4

Please?
Reply
#5

Quote:
Originally Posted by Windows32
Посмотреть сообщение
LolWut?

Can you tell me how I'd make a payday system and the timer would continue when the player logs in?
You know what , half of the new people on the forum never really wanted to learn Scripting. All they want to do is Code a goddamn a server in which 5-10 players will be playing and make the same type of game mode all over again using old generation techniques callback names and everything.

@Every New Scripter - If you dont want to learn PAWN Scripting and your here to fix your Edited Game Mode of your Server Bugs and issues so that will not help you at all. Stop wasting money , time , energy etc in ever trying so.
Reply
#6

I only want the basic of it, calm down.
Reply
#7

Create a function that is called every 1 second (so a timer), save a variable to the player's file, add it up in seconds and when the amount of seconds is equal to 3600 (or higher), you can issue the money to the player.
Reply
#8

Quote:
Originally Posted by Calgon
Посмотреть сообщение
Create a function that is called every 1 second (so a timer), save a variable to the player's file, add it up in seconds and when the amount of seconds is equal to 3600 (or higher), you can issue the money to the player.
Thats the Logic behind your so called Payday system.
Reply
#9

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Thats the Logic behind your so called Payday system.
Thank you captain obvious. Could your post be any more useless?
Reply
#10

Quote:
Originally Posted by Calgon
Посмотреть сообщение
Thank you captain obvious. Could your post be any more useless?
Just became more useless bro! xD. Much Love! @Moderators - Forgive me for posting uselessly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)