05.04.2014, 20:11
Hello!
I have some problem with payday. I need to give money every hour when player is in faction and One score too!
I have tax system in my gm but now I want to add this:
Here:
Thanks for help!
I have some problem with payday. I need to give money every hour when player is in faction and One score too!
I have tax system in my gm but now I want to add this:
PHP код:
(PlayerInfo[i][pLeader] == 1||PlayerInfo[i][pMember] == 1)
{
{
if(PlayerInfo[i][pRank] == 1)
{
SafeGivePlayerMoney(i, 20000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 20.000$ (Rank 1)");
SendClientMessage(i, COLOR_GREY, string);
}
else if(PlayerInfo[i][pRank] == 2)
{
SafeGivePlayerMoney(i, 40000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 40.000$ (Rank 2)");
SendClientMessage(i, COLOR_GREY, string);
}
else if(PlayerInfo[i][pRank] == 3)
{
SafeGivePlayerMoney(i, 60000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 60.000$ (Rank 3)");
SendClientMessage(i, COLOR_GREY, string);
}
else if(PlayerInfo[i][pRank] == 4)
{
SafeGivePlayerMoney(i, 80000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 80.000$ (Rank 4)");
SendClientMessage(i, COLOR_GREY, string);
}
else if(PlayerInfo[i][pRank] == 5)
{
SafeGivePlayerMoney(i, 90000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 90.000$ (Rank 5)");
SendClientMessage(i, COLOR_GREY, string);
}
else if(PlayerInfo[i][pRank] == 6)
{
SafeGivePlayerMoney(i, 100000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 100.000$ (Rank 6)");
SendClientMessage(i, COLOR_GREY, string);
}
else if(PlayerInfo[i][pRank] == 7)
{
SafeGivePlayerMoney(i, 110000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 110.000$ (Rank 7)");
SendClientMessage(i, COLOR_GREY, string);
}
else if(PlayerInfo[i][pRank] == 8)
{
SafeGivePlayerMoney(i, 120000);
format(string, sizeof(string), "*You have retrieved your Faction PayDay of 120.000$ (Rank 8)");
SendClientMessage(i, COLOR_GREY, string);
PHP код:
public PayDay() //
{
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
new tax = (Tax / 2)*(PlayerInfo[i][pLevel]);
if(PlayerInfo[i][pAccount] > PlayerInfo[i][pCash])
{
PlayerInfo[i][pAccount] -= tax;
banksys[dCash] += tax;
SaveCityhallSystem()
GivePlayerScore(i, +1);
SendClientMessageToAll(-1, "Payday!");
format(string, sizeof(string), " Government Tax: -$%d", tax);
SendClientMessage(i, COLOR_GREEN, string);
}
else
{
PlayerInfo[i][pCash] -= tax;
banksys[dCash] += tax;
SaveCityhallSystem()
format(string, sizeof(string), " Government Tax: -$%d", tax);
SendClientMessage(i, COLOR_GREEN, string);
}
if(PlayerInfo[i][pAddict] == 1)
{
PlayerInfo[i][pExp]+= 4;
}
//PlayerInfo[i][pExp]+= 2;
/*if(dxp == 1)
{
PlayerInfo[i][pExp]+= 4;
SendClientMessage(i, COLOR_GREEN, "Happy Hours You earned 4-XP Points");
//PlayerInfo[i][pExp]+= 2;
}
else if(dxp == 0)
{*/
PlayerInfo[i][pExp]+= 2;
//}
else if
}
}
}
return 1;
}