search script PAYDAY
#1

cash + 1 score pls ?

example:

PAYDAY:
----------------------------------
you get: 1000$ and 1 score points!
----------------------------------
Reply
#2

pawn Код:
SetTimer("payday", 600000, 1);//600000 is 24 hour

forward payday(playerid);
public payday(playerid)
{
    new hh, mm, ss;
    gettime( hh, mm, ss );

    if( mm == 0 )
    {
        for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
        {
         GivePlayerMoney(i,1000);
         new PlayerScore = GetPlayerScore(i);
         SetPlayerScore(i,PlayerScore+1);
         SendClientMessage(i,-1,"----------------------------------");
         SendClientMessage(i,-1,"you get: 1000$ and 1 score points!");
         SendClientMessage(i,-1,"----------------------------------");
        }
    }
    return 1;
 }
Reply
#3

pls compile files +reputation
Reply
#4

I presume you're new to scripting? That's cool, we gotta start somewhere.

pawn Код:
#include a_samp

main(){}


public OnFilterScriptInit()
{
    print("payday");
    SetTimer("payday",600000,true);
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
forward payday();
public payday()
{
    SendClientMessageToAll(-1,"SYSTEM: Payday!");
    for(new i = 0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
                SetPlayerScore(i, GetPlayerScore(i)+1);
                GivePlayerMoney(i,1000);
        }
    }
    return 1;
}
Reply
#5

thanks
edit: not work
Reply
#6

bump
Reply
#7

this is payday, you must wait 24 HOUR to get it, you must change
pawn Код:
SetTimer("payday",600000,true);
to ex:
pawn Код:
SetTimer("payday",10000,true);
Reply
#8

600000ms are equal to 10 minutes and not 24 hours.
Reply
#9

600000ms are equal to 10 minutes and are IG 24 hours.
Reply
#10

yes, but he say

thanks
edit: not work

he won't wait 24 hours, so, i show example for him to 10 mins
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)