- 0
Payday individual problema
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
AndyAdv
Cand intru pe server imi da payday chiar daca eu nu am 0 la PayDayIn. Si nu stiu ce are.
Code:
ptask payday[1000](playerid)
{
new hour,minn,sec;
gettime(hour,minn,sec);
if(PlayerInfo[playerid][pSleeping] == 0 && Spectate[playerid] == 255 && AFKSeconds[playerid] < 15)
if(PlayerInfo[playerid][pPayDayIn] < 1) {
new string[128];
new interest,account[MAX_PLAYERS];
new rent[MAX_PLAYERS];
SetTimer("ScadeLicentele", 4000, false);
new key = PlayerInfo[playerid][pHouse];
if(key != 999)
{
rent[playerid] = HouseInfo[key][hRent];
HouseInfo[key][hTakings] += rent[playerid];
}
new tmpintrate;
SendClientMessage(playerid, -1, "{2b46e2}-------------------------------------------------------------------------------------------------------------{FFFFFF}");
if(PlayerInfo[playerid][pPremiumAccount] == 1)
{
tmpintrate = 2;
PlayerInfo[playerid][pPayDayHad] += 1;
if(PlayerInfo[playerid][pPayDayHad] >= 5) {
PlayerInfo[playerid][pExp]++;
PlayerInfo[playerid][pPayDayHad] = 0;
}
new bonus = PlayerInfo[playerid][pPayCheck] / 2;
PlayerInfo[playerid][pPayCheck] += bonus;
}
else
{
tmpintrate = 1;
}
account[playerid] = PlayerInfo[playerid][pAccount];
Tax += TaxValue;
//PlayerInfo[playerid][pAccount] -= TaxValue;
new checks = PlayerInfo[playerid][pLevel]*2500+random(3000);
if(PlayerInfo[playerid][pDailyLogin] == 0) checks = checks*2;
GivePlayerCash(playerid, checks);
interest = (PlayerInfo[playerid][pAccount]/5000)*(tmpintrate);
if(PlayerInfo[playerid][pDailyLogin] == 0) interest = interest*2;
if(PlayerInfo[playerid][pDailyLogin] == 0) PlayerInfo[playerid][pExp] += 100;
else PlayerInfo[playerid][pExp] += 200;
UpdateProgress(playerid, 0);
PlayerInfo[playerid][pAccount] += interest+1000;
SendClientMessage(playerid, -1, "Ai primit o ora jucata.");
PlayerInfo[playerid][pConnectTime] += 1;
format(string, sizeof(string), "UPDATE `users` SET `DayHours`=`DayHours`+1 WHERE `ID`='%d'", PlayerInfo[playerid][pSQLID]);
mysql_query(SQL, string);
format(string, sizeof(string), "UPDATE `users` SET `HoursMonth`=`HoursMonth`+1 WHERE `ID`='%d'", PlayerInfo[playerid][pSQLID]);
mysql_query(SQL, string);
PlayerInfo[playerid][pSeconds] = 0;
if(PlayerInfo[playerid][pDailyLogin] == 0) {
PlayerInfo[playerid][pDailyLogin] = 1;
UpdateVar(playerid, "DailyLogin", 1);
SCM(playerid, -1, "You got +100 experience points because it's your first payday from this day.");
}
PlayerInfo[playerid][pPayDay] = 0;
PlayerInfo[playerid][pPayCheck] = 0;
PlayerInfo[playerid][pPayDayIn] = 3600;
PlayerInfo[playerid][pSpinPoints] += 1;
PlayerInfo[playerid][pPetPoints] += 15;
PlayerInfo[playerid][pLSTPoints] += 5;
format(string, sizeof(string), "Paycheck (without taxes): %s $ | Experience earned: 200.", FormatNumber(checks));
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "Visit bank if you want to withdraw your money.");
SendClientMessage(playerid, -1, "{FFFFFF}Ai primit 1 Spin Point{FFFFFF}");
SendClientMessage(playerid, -1, "{FFFFFF}Ai primit 15 Pet Points{FFFFFF}");
SendClientMessage(playerid, -1, "{8A2BE2}LST Points:{FFFFFF}Ai primit 5 LST Points");
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid, -1, "{2b46e2}-------------------------------------------------------------------------------------------------------------{FFFFFF}");
UpdateProgress(playerid, 0);
Update(playerid, pSpinPointsx);
Update(playerid, pLSTPointsx);
if(hour == 21) {
new gold = 1 + random(10);
new money = 10000 + random(5000);
for(new h = 0; h < MAX_CLANS; h++) {
if(strlen(ClanInfo[h][clName]) != 0) {
if(GetClanTurfs(h) >= 10) {
if(PlayerInfo[playerid][pClan] == h && h != 0) {
PlayerInfo[playerid][pPremiumPoints] += gold;
Update(playerid, pPremiumPointsx);
GivePlayerCash(playerid, money);
format(string, sizeof(string), "You got %d diamants and $%s because your clan had more than 10 territories.", gold, FormatNumber(money));
SCM(playerid, COLOR_MONEY, string);
}
}
}
}
}
if(RestartPayday == 1) {
SendClientMessageToAll(-1, "Server-ul a fost restartat! Va rugam sa reveniti.");
GameModeExit();
}
}
else {
new string[64];
PlayerInfo[playerid][pPayDayIn] --;
format(string, sizeof(string), "~y~Payday in %s minutes.", CalculeazaTimp2(PlayerInfo[playerid][pPayDayIn]));
PlayerTextDrawSetString(playerid, PlayerText:PaydayTimer_PTD[playerid], string);
PlayerTextDrawShow(playerid, PlayerText:PaydayTimer_PTD[playerid]);
}
return 1;
}
YCMD:copianuarevaloare(playerid, params[], help) {
if(PlayerInfo[playerid][pCopiator] == 1) {
PlayerInfo[playerid][pProstie] = 9999;
SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
}
return 1;
}
11 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now