SA-MP Forums Archive
search script PAYDAY - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: search script PAYDAY (/showthread.php?tid=447676)



search script PAYDAY - [BG]VPN - 01.07.2013

cash + 1 score pls ?

example:

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


Re: search script PAYDAY - xFirex - 01.07.2013

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;
 }



Re: search script PAYDAY - [BG]VPN - 01.07.2013

pls compile files +reputation


Re: search script PAYDAY - DobbysGamertag - 01.07.2013

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;
}



Re: search script PAYDAY - [BG]VPN - 01.07.2013

thanks
edit: not work


Re: search script PAYDAY - [BG]VPN - 01.07.2013

bump


Re: search script PAYDAY - Guest123 - 01.07.2013

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);



Re: search script PAYDAY - Macluawn - 01.07.2013

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


Re: search script PAYDAY - Anak - 01.07.2013

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


Re: search script PAYDAY - Guest123 - 01.07.2013

yes, but he say

thanks
edit: not work

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