Pay day Help
#1

i had this payday system
Код:
//Defines
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_WHITE 0xFFFFFFAA

public OnFilterScriptInit()
{
	print("PayDay System Loaded");
	//====================================================
	SetTimer("paytime", 60000, 1);
	return 1;
}

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

    if( mm == 0 )
    {
	    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	    {
			new string[128];
			new RandomPay = random(50000 - 10000) + 10000;
			GivePlayerMoney( playerid, RandomPay );
		    SendClientMessage(playerid, COLOR_RED,"-------------------------");
		    format(string, sizeof(string), "      You Have Got Paycheck Of => $%i", RandomPay);
			SendClientMessage(i, COLOR_RED, string);
		    SendClientMessage(playerid, COLOR_WHITE,"-------------------------");
	    }
	}
    return 1;
}
i want this

cmdayday [playerid,params]{
{
shows the time remaining for payday

how to make it ?
Reply
#2

new hh, mm, ss, string[64];
gettime( hh, mm, ss );
mm=abs(60-mm);
ss=abs(60-ss);
format(string,sizeof(string),"To payday: %d min %d s",mm,ss) ;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)