- 0
Problema /payday
-
Similar Content
-
- 6 answers
- 866 views
-
- 2 replies
- 118 views
-
- 1 answer
- 60 views
-
- 3 answers
- 183 views
-
- 11 replies
- 249 views
-
-
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
Sammich
Problema intalnita (descriere): Am vrut sa adaug comanda payday,si am luat tot de la public payday si sa ii pun CMD,a mers totul cum trebuie la compile dar cand incerc sa folosesc in joc comanda payday nu merge,ce sa ii fac?
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):
------------------------------------------------------------------------------------------------------------------------------------
CMD:payday(playerid, params[])
{
foreach(Player, x)
{
new
BankInterest = playerVariables[x][pBankMoney] / 350,
RandPay = (random(65) + 5) * (playerVariables[x][pPlayingHours]/60) + random(50) + 50,
TotalPay = BankInterest + RandPay;
SendClientMessage(x, COLOR_TEAL, "----------------------------------------------------------------------------");
SendClientMessage(x, COLOR_GREY, "Your paycheck has arrived, please visit the bank to withdraw your money.");
playerVariables[x][pBankMoney] += TotalPay;
new taxamount = 5;
if(playerVariables[x][pDriveLicense] > 0)
{
playerVariables[x][pDriveLicense] -= 1;
if(playerVariables[x][pDriveLicense] == 0)
{
SendClientMessage(x,COLOR_RED,"Your driving license has expired!");
}
}
if(playerVariables[x][pGunLicense] > 0)
{
playerVariables[x][pGunLicense] -= 1;
if(playerVariables[x][pGunLicense] == 0)
{
SendClientMessage(x,COLOR_RED,"Your gun license has expired!");
}
}
if(playerVariables[x][pFlyLicense] > 0)
{
playerVariables[x][pFlyLicense] -= 1;
if(playerVariables[x][pFlyLicense] == 0)
{
SendClientMessage(x,COLOR_RED,"Your fly license has expired!");
}
}
if(playerVariables[x][pBoatLicense] > 0)
{
playerVariables[x][pBoatLicense] -= 1;
if(playerVariables[x][pBoatLicense] == 0)
{
SendClientMessage(x,COLOR_RED,"Your boat license has expired!");
}
}
if(playerVariables[x][pSeconds] >= 900)
{
playerVariables[x][pPlayingHours]++;
if(playerVariables[x][pGiftHours] > 0)
{
if(playerVariables[x][pGiftHours] == 0)
{
SCM(x,COLOR_YELLOW,"You can now use /getgift.");
}
playerVariables[x][pGiftHours] --;
}
}
else
{
SCM(x,COLOR_LIGHTBLUE,"Nu ai jucat suficient pentru a primi ora jucata.");
}
if(playerVariables[x][pDonate] == 1)
{
playerVariables[x][pBankMoney] += playerVariables[x][pLevel] * 10;
format(szMessage, 256, "Premium bonus: $%s", NumberFormat(playerVariables[x][pLevel] * 10));
SCM(x, COLOR_GREY, szMessage);
}
if(playerVariables[x][pDonate] == 1)
{
playerVariables[x][pRobPoints]+= 2;
playerVariables[x][pRPoints]+= 2;
if(playerVariables[x][pFPunish] > 0)
{
playerVariables[x][pFPunish] -= 2;
if(playerVariables[x][pFPunish] < 1)
{
playerVariables[x][pFPunish] = 0;
}
}
}
if(playerVariables[x][pDonate] == 0)
{
playerVariables[x][pRobPoints]++;
playerVariables[x][pRPoints]++;
if(playerVariables[x][pFPunish] > 0)
{
playerVariables[x][pFPunish] --;
}
}
format(szMessage, sizeof(szMessage), "Paycheck: $%d | Bank balance: $%d | Bank interest: $%d | Tax: $%d (%d percent) | Normal earnings: $%d", RandPay, playerVariables[x][pBankMoney], BankInterest, taxamount, assetVariables[1][aAssetValue], TotalPay-taxamount);
SendClientMessage(x, COLOR_GREY, szMessage);
SendClientMessage(x, COLOR_TEAL, "----------------------------------------------------------------------------");
playerVariables[x][pSeconds] = 0;
new wakaname2[25];
GetPlayerName(x,wakaname2,25);
new str[128];
format(str,128,"UPDATE `playeraccounts` SET `playerHours`='%d' WHERE `playerName`='%s'",playerVariables[x][pPlayingHours],playerVariables[x][pInternalID]);
mysql_tquery(handle,str);
savePlayerData(x);
}
return 1;
}
------------------------------------------------------------------------------------------------------------------------------------
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da,am incercat si nu merge comanda
Link to comment
Share on other sites
8 answers to this question
Recommended Posts