[FS/Snippet]Connor's Auto Payday
#1

Connor's Auto payday, It basicly makes the player get "ammout" Each 10 minutes.// 5000 ATM Can be changed
Pastebin: http://pastebin.com/d42fb823f
Edited: Fixed the 10 mins.
Reply
#2

Works only for playerid '0'

edit, and "100000 ms" is not 10 minutes, but 100 seconds (1 minute and 40 seconds).

Please test your scripts before releasing them.
Reply
#3

Indeed, and i would call it a snippet.
Reply
#4

This isn't very functional at all, looking at the timer. It needs to have a loop within it, here i'll fix your script, give me a minute. Plus i'll take out the unnecessary bits, of which there are a lot.

62 -> 22 lines
not functional -> functional

pawn Code:
#include <a_samp>
forward Timer();
#define COLOR_LIGHTGREEN 0x9ACD32AA

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Connnor's Auto Payday");
    print("--------------------------------------\n");
    SetTimer("Timer", 600000, 1); // Each 10 minutes the Timer will go off.
    return 1;
}

public Timer()
{
    for(new a=0; a<MAX_PLAYERS; a++)
      {
        GivePlayerMoney(a, 5000);
        }
    SendClientMessageToAll(COLOR_LIGHTGREEN, "You've recieved a payday of 5000 dollars!");
    return 1;
}
Reply
#5

Change it to 30000
Reply
#6

Quote:
Originally Posted by PatrickStar
Change it to 30000
10 minutes...

1 second = 1000 ms
60 seconds = 1 minute = 60000
600 seconds = 10 minutes = 600000 ?

Do you mean you'd prefer it as 5 minutes, or you saying my maths was wrong?
Reply
#7

Oh, my bad. I thought he set it for 5 minutes, which would be 300000 right?
Reply
#8

Quote:
Originally Posted by PatrickStar
Oh, my bad. I thought he set it for 5 minutes, which would be 300000 right?
Assuming that's half of whatever I said, yes.
Reply
#9

Its nice... But you should remember to test your Scripts be4 releasing Hehe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)