Pay day Help - 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: Pay day Help (
/showthread.php?tid=603016)
Pay day Help -
bugmenotlol - 17.03.2016
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
cmd

ayday [playerid,params]{
{
shows the time remaining for payday
how to make it ?
Re: Pay day Help -
czerwony03 - 17.03.2016
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) ;