/* Date/time functions * * © Copyright 2001-2005, ITB CompuPhase * This file is provided as is (no warranties). */ #if defined _time_included #endinput #endif #define _time_included #pragma library Time native gettime(&hour=0, &minute=0, &second=0); native getdate(&year=0, &month=0, &day=0); native tickcount(&granularity=0);
|
Originally Posted by Don Correlli
Server's time/date.
Everything is on wiki, too: https://sampwiki.blast.hk/wiki/Gettime https://sampwiki.blast.hk/wiki/Getdate |
|
Originally Posted by Mowgli
ye but how do i Set the server time?
|
|
Originally Posted by Mowgli
will GetDate and GetTime get the time of were the server is?
|

public PayDay()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(AccountInfo[i][aLogged] == 1)
{
if (GetPlayerTotalMoney(i) >= PayCutoff)
{
SendClientMessage(i,COLOR_WHITE,"[Info:] You are to rich dont expect a Giro this time");
}
new wstring[256];
new intrate = 1*AccountInfo[i][aScore];
// new randcheck = 999 + random(4999);
new interest = (AccountInfo[i][aBank]/1000)*(intrate);
// new Level = AccountInfo[i][aScore];
new payday = BasePay*AccountInfo[i][aScore];
new newbank = AccountInfo[i][aBank] + interest;
new randtax = 20 + random(50);
new Gtax = payday/randtax;
SendClientMessage(i,COLOR_GREEN,"|_____________Bank_of_San_Andreas______________|");
SendClientMessage(i,COLOR_GREEN,"|___________________PaySlip____________________|");
format(wstring, sizeof(wstring), "~y~PayDay~n~~w~Paycheck: ~g~%d",payday);
GameTextForPlayer(i, wstring, 5000, 1);
format(wstring, sizeof(wstring), "PayCheck: $%d", payday);
SendClientMessage(i,COLOR_WHITE, wstring);
format(wstring, sizeof(wstring), "Balance: $%d, Interest Gained: $%d, New Balance: $%d, Interest Rate: 0.%d percent", AccountInfo[i][aBank], interest, newbank, intrate);
SendClientMessage(i,COLOR_WHITE, wstring);
format(wstring, sizeof(wstring), "Government Taxes: $%d", Gtax);
SendClientMessage(i,COLOR_WHITE, wstring);
AccountInfo[i][aBank] += interest;
AccountInfo[i][aBank] -= Gtax;
AccountInfo[i][aBank] += payday;
AccountInfo[i][aXP]++;
if(AccountInfo[i][aReport] > 0)
AccountInfo[i][aReport]--;
if(AccountInfo[i][aTacklebox] > 0)
AccountInfo[i][aTacklebox]--;
SendClientMessage(i,COLOR_GREEN,"______________________________________________________________________________________");
}
else
{
SendClientMessage(i,COLOR_WHITE,"[Info:] Payday not received, not played long enough");
}
}
else
{
SendClientMessage(i,COLOR_WHITE,"[Info:] You are not logged in, payday not received");
}
}
}