I don't have payday
#1

hi every body. i just install Raven's Roleplay game mode for my server. but i have a little problem. my server do not have any payday in every hours. what can i do to solve this pro blem, plz help me !!!!!!

This Code
Код:
public PayDay()
{
	new string[128];
	new account,interest;
	new rent = 0;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && !IsPlayerNPC(i))
		{
		    if(PlayerInfo[i][pLevel] > 0)
		    {
			    if(MoneyMessage[i]==1)
				{
				    new bank = PlayerInfo[i][pAccount];
				    SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
				    GameTextForPlayer(i, "~r~Busted!", 2000, 1);
				    SafeSetPlayerInterior(i, 6);
			   		SafeSetPlayerPos(i, 264.6288,77.5742,1001.0391);
		            PlayerInfo[i][pJailed] = 1;
		            SafeResetPlayerWeapons(i);
		            SafeResetPlayerMoney(i);
					SafeGivePlayerMoney(i, 1);
					WantedPoints[i] = 0;
					PlayerInfo[i][pAccount] = (bank + DebtMoney[i]);
					DebtMoney[i] = 0;
					PlayerInfo[i][pJailTime] = 240;
					TextDrawShowForPlayer(i, Textdraw1[i]);
					format(string, sizeof(string), "You are jailed for %d seconds.   Bail: Unable", PlayerInfo[i][pJailTime]);
					SendClientMessage(i, COLOR_WHITE, string);
				}
				new playername2[MAX_PLAYER_NAME];
				GetPlayerName(i, playername2, sizeof(playername2));
				account = PlayerInfo[i][pAccount];
				new key = PlayerInfo[i][pPhousekey];
				if(key != 9999)
				{
					rent = HouseInfo[key][hRent];
					if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
					{
						rent = 0;
					}
					else if(rent > GetPlayerMoney(i))
					{
						PlayerInfo[i][pPhousekey] = 9999;
						SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
						rent = 0;
					}
					HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
				}
				new tmpintrate;
				if (key != 999 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
				{
				    if(PlayerInfo[i][pRegularRank] > 0) { tmpintrate = intrate+4; }
					else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
				}
				else
				{
				    if(PlayerInfo[i][pRegularRank] > 0) { tmpintrate = 3; }
					else { tmpintrate = 1; }
				}
				if(PlayerInfo[i][pPayDay] >= 5)
				{
				    Tax += TaxValue;//Should work for every player online
				    PlayerInfo[i][pAccount] -= TaxValue;
					new checks = PlayerInfo[i][pPayCheck] / 5;
					if(PlayerInfo[i][pRegularRank] > 0)
					{
					    new bonus = PlayerInfo[i][pPayCheck] / 10;
					    checks += bonus;
					}
				    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
				    account += checks;
				    if(PlayerInfo[i][pAccount] > 0)
				    {
				    	PlayerInfo[i][pAccount] -= ebill;
				    	SBizzInfo[4][sbTill] += ebill;
					}
					else
					{
					    ebill = 0;
					}
					interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
					PlayerInfo[i][pExp]++;
					PlayerPlayMusic(i);
					PlayerInfo[i][pAccount] = account+interest;
					SendClientMessage(i, COLOR_GREEN, "|___ BANK STATMENT ___|");
					format(string, sizeof(string), "  Paycheck: $%d   Tax Money: -$%d", checks, TaxValue);
					SendClientMessage(i, COLOR_WHITE, string);
					if(PlayerInfo[i][pPhousekey] != 9999 || PlayerInfo[i][pPbiskey] != 9999)
					{
					    format(string, sizeof(string), "  Electricity Bill: -$%d", ebill);
						SendClientMessage(i, COLOR_GRAD1, string);
					}
					format(string, sizeof(string), "  Balance: $%d", account - checks);
					SendClientMessage(i, COLOR_WHITE, string);
					format(string, sizeof(string), "  Interest Rate: 0.%d percent",tmpintrate);
					SendClientMessage(i, COLOR_GRAD2, string);
					format(string, sizeof(string), "  Interest Gained $%d", interest);
					SendClientMessage(i, COLOR_GRAD3, string);
					SendClientMessage(i, COLOR_GREEN, "|--------------------------------------|");
					format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[i][pAccount]);
					SendClientMessage(i, COLOR_GRAD5, string);
					format(string, sizeof(string), "  Rent: -$%d", rent);
					SendClientMessage(i, COLOR_GRAD5, string);
					format(string, sizeof(string), "~y~PayDay~n~~w~Check paid into your account");
					GameTextForPlayer(i, string, 5000, 1);
					rent = 0;
					PlayerInfo[i][pPayDay] = 0;
					PlayerInfo[i][pPayCheck] = 0;
					if(FarmerVar[i] == 0)
					{
						FarmerPickup[i][0] = 0;
					}
					if(DrugFarmerVar[i] == 0)
					{
						DrugFarmerPickup[i][0] = 0;
					}
					if(SmugglerWork[i] == 0)
					{
						PayDaySecure[i] = 0;
					}
					if(PlayerInfo[i][pRegularRank] > 0)
					{
					    PlayerInfo[i][pPayDayHad] += 1;
					    if(PlayerInfo[i][pPayDayHad] >= 5)
					    {
					        PlayerInfo[i][pExp]++;
					        PlayerInfo[i][pPayDayHad] = 0;
					    }
					}
				}
				else
				{
				    SendClientMessage(i, COLOR_WHITE, "* You haven't played long enough to obtain a PayDay.");
				}
			}
		}
	}
	SaveAccounts();
	new rand = random(2500); rand += 1245;
   	Jackpot += rand;
    SaveStuff();
    SaveAnticheat();
    format(string, sizeof(string), "Lottery News: Our New Jackpot has been increased to $%d.", Jackpot);
	OOCOff(COLOR_WHITE, string);
	return 1;
}
or link file pwn http://www.mediafire.com/?8xddxy99ll8bpxy

Plz help me !!!!!!
Reply
#2

help me
Reply
#3

pawn Код:
public PayDay()
{
    new string[128];
    new account,interest;
    new rent = 0;
    GiftAllowed = 1;
    foreach(Player, i)
    {
            if(PlayerInfo[i][pLevel] > 0)
            {
                if(MoneyMessage[i]==1)
                {
                    if( PlayerInfo[i][pJailed] < 1 && !IsACop(i))
                    {
                        format(string,sizeof(string),"You're failing to pay your debt of $%d - now the police are on the look out for you.",GetPlayerCash(i));
                        SendClientMessageEx(i, COLOR_LIGHTRED, string);
                        if(PlayerInfo[i][pWantedLevel] < 6) PlayerInfo[i][pWantedLevel] += 1;
                        PlayerInfo[i][pCrimes] += 1;
                        SetPlayerWantedLevel(i, PlayerInfo[i][pWantedLevel]);
                    }
                }
                account = PlayerInfo[i][pAccount];
                if(PlayerInfo[i][pRenting] != INVALID_HOUSE_ID)
                {
                    if(HouseInfo[PlayerInfo[i][pRenting]][hRentFee] > PlayerInfo[i][pAccount])
                    {
                        PlayerInfo[i][pRenting] = INVALID_HOUSE_ID;
                        SendClientMessageEx(i, COLOR_WHITE, "You have been evicted.");
                    }
                    else {
                        HouseInfo[PlayerInfo[i][pRenting]][hSafeMoney] += HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
                        PlayerInfo[i][pAccount] -= HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
                    }
                }
                new tmpintrate, faretax;
                tmpintrate = 1;

               
                if(PlayerInfo[i][pLevel] <= 5) SendClientMessageEx(i,COLOR_LIGHTBLUE,"Need to travel somewhere and don't have wheels? Use '/service taxi' to call a cab!");
                if(PlayerInfo[i][pPayDay] >= 5)
                {
                    if(GetPVarInt(i, "AdvisorDuty") == 1)
                    {
                        PlayerInfo[i][pDutyHours]++;
                    }
                    if(PlayerInfo[i][pDonateRank] > 0)
                    {
                        new bonus = PlayerInfo[i][pPayCheck] / 2;
                        PlayerInfo[i][pPayCheck] += bonus;
                    }
                    if(SpecTimer == 1)
                    {
                        AddSpecialToken(i);
                    }
                    rent = 0;
                    faretax = 0;
                    new checks = PlayerInfo[i][pPayCheck];
                    if(PlayerInfo[i][pTaxiLicense] == 1) faretax = (checks/100)*5;
                    new Taxable = (( checks / 100 ) * TaxValue);
                    PlayerInfo[i][pAccount] -= Taxable + faretax;
                    Tax += Taxable + faretax;


                    PlayerInfo[i][pExp]++;
                    PlayerInfo[i][pAccount] = account+interest;
                    SendClientMessageEx(i, COLOR_WHITE, "________ BANK STATEMENT ________");
                    format(string, sizeof(string), "  Paycheck: $%d  |  Tax Money: -$%d (%d percent)", checks, Taxable, TaxValue);
                    SendClientMessageEx(i, COLOR_GRAD1, string);
Not sure, But try it
Reply
#4

Quote:
Originally Posted by ElieJabbour
Посмотреть сообщение
pawn Код:
public PayDay()
{
    new string[128];
    new account,interest;
    new rent = 0;
    GiftAllowed = 1;
    foreach(Player, i)
    {
            if(PlayerInfo[i][pLevel] > 0)
            {
                if(MoneyMessage[i]==1)
                {
                    if( PlayerInfo[i][pJailed] < 1 && !IsACop(i))
                    {
                        format(string,sizeof(string),"You're failing to pay your debt of $%d - now the police are on the look out for you.",GetPlayerCash(i));
                        SendClientMessageEx(i, COLOR_LIGHTRED, string);
                        if(PlayerInfo[i][pWantedLevel] < 6) PlayerInfo[i][pWantedLevel] += 1;
                        PlayerInfo[i][pCrimes] += 1;
                        SetPlayerWantedLevel(i, PlayerInfo[i][pWantedLevel]);
                    }
                }
                account = PlayerInfo[i][pAccount];
                if(PlayerInfo[i][pRenting] != INVALID_HOUSE_ID)
                {
                    if(HouseInfo[PlayerInfo[i][pRenting]][hRentFee] > PlayerInfo[i][pAccount])
                    {
                        PlayerInfo[i][pRenting] = INVALID_HOUSE_ID;
                        SendClientMessageEx(i, COLOR_WHITE, "You have been evicted.");
                    }
                    else {
                        HouseInfo[PlayerInfo[i][pRenting]][hSafeMoney] += HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
                        PlayerInfo[i][pAccount] -= HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
                    }
                }
                new tmpintrate, faretax;
                tmpintrate = 1;

               
                if(PlayerInfo[i][pLevel] <= 5) SendClientMessageEx(i,COLOR_LIGHTBLUE,"Need to travel somewhere and don't have wheels? Use '/service taxi' to call a cab!");
                if(PlayerInfo[i][pPayDay] >= 5)
                {
                    if(GetPVarInt(i, "AdvisorDuty") == 1)
                    {
                        PlayerInfo[i][pDutyHours]++;
                    }
                    if(PlayerInfo[i][pDonateRank] > 0)
                    {
                        new bonus = PlayerInfo[i][pPayCheck] / 2;
                        PlayerInfo[i][pPayCheck] += bonus;
                    }
                    if(SpecTimer == 1)
                    {
                        AddSpecialToken(i);
                    }
                    rent = 0;
                    faretax = 0;
                    new checks = PlayerInfo[i][pPayCheck];
                    if(PlayerInfo[i][pTaxiLicense] == 1) faretax = (checks/100)*5;
                    new Taxable = (( checks / 100 ) * TaxValue);
                    PlayerInfo[i][pAccount] -= Taxable + faretax;
                    Tax += Taxable + faretax;


                    PlayerInfo[i][pExp]++;
                    PlayerInfo[i][pAccount] = account+interest;
                    SendClientMessageEx(i, COLOR_WHITE, "________ BANK STATEMENT ________");
                    format(string, sizeof(string), "  Paycheck: $%d  |  Tax Money: -$%d (%d percent)", checks, Taxable, TaxValue);
                    SendClientMessageEx(i, COLOR_GRAD1, string);
Not sure, But try it
Код:
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(3860) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(3889) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4117) : error 017: undefined symbol "foreach"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4119) : error 017: undefined symbol "playerid"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4122) : error 017: undefined symbol "playerid"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4235) : error 004: function "SafeSetPlayerInterior" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4278) : error 017: undefined symbol "GetVehicleName"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4278) : warning 202: number of arguments does not match definition
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4294) : error 004: function "IsASalesVehicle" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4298) : error 004: function "GetVehiclePrice" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4393) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4398) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4403) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4408) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4413) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(5231) : error 004: function "ABroadCast" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(5233) : error 004: function "ABroadCast" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6032) : error 004: function "ClearChatbox" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6050) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6055) : error 004: function "OnPlayerUpdateEx" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6077) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6088) : error 004: function "OnPlayerUpdateEx" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6099) : error 004: function "ClearChatbox" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6107) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6109) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6259) : error 004: function "SendIRCMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6281) : error 004: function "SendIRCMessage" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
How to fix?
Reply
#5

Quote:
Originally Posted by dat_nguyen
Посмотреть сообщение

Код:
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(3860) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(3889) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4117) : error 017: undefined symbol "foreach"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4119) : error 017: undefined symbol "playerid"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4122) : error 017: undefined symbol "playerid"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4235) : error 004: function "SafeSetPlayerInterior" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4278) : error 017: undefined symbol "GetVehicleName"
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4278) : warning 202: number of arguments does not match definition
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4294) : error 004: function "IsASalesVehicle" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4298) : error 004: function "GetVehiclePrice" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4393) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4398) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4403) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4408) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(4413) : error 004: function "SafeSetPlayerPos" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(5231) : error 004: function "ABroadCast" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(5233) : error 004: function "ABroadCast" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6032) : error 004: function "ClearChatbox" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6050) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6055) : error 004: function "OnPlayerUpdateEx" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6077) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6088) : error 004: function "OnPlayerUpdateEx" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6099) : error 004: function "ClearChatbox" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6107) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6109) : error 004: function "SendAdminMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6259) : error 004: function "SendIRCMessage" is not implemented
C:\ROCKST~1\Server\RAVEN'~1.3C\GAMEMO~1\larp.pwn(6281) : error 004: function "SendIRCMessage" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
How to fix?
Got Team Viewer ?, if yes, send me the ID and pass over PM
Reply
#6

add my yahoo ok ? t.dat_95
Reply
#7

Код:
forward StopPMTimer(playerid);

SetTimer("StopPMTimer",3600000,0);

public StopPMTimer(playerid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
   if(IsPlayerConnected(i))
   {
     GivePlayerMoney(playerid,2000);
     SendClientMessage(playerid, COLOR_WHITE, "Paycheck of 2000");
     GameTextForPlayer(playerid, "~y~4~w~0000~g~$ ~n~~r~Thanks for playing!",3000,0);
     return 1;
   }
}
return 1;
}
Give me +1
Reply
#8

Quote:
Originally Posted by Twizted
Посмотреть сообщение
Код:
forward StopPMTimer(playerid);

SetTimer("StopPMTimer",3600000,0);

public StopPMTimer(playerid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
   if(IsPlayerConnected(i))
   {
     GivePlayerMoney(playerid,2000);
     SendClientMessage(playerid, COLOR_WHITE, "Paycheck of 2000");
     GameTextForPlayer(playerid, "~y~4~w~0000~g~$ ~n~~r~Thanks for playing!",3000,0);
     return 1;
   }
}
return 1;
}
1. Thats a totally different code as he has (does not check any job/or not even if the player even IS doing a job)

Quote:
Originally Posted by Twizted
Посмотреть сообщение
Give me +1
2. You should NEVER ask for reputations, you got to EARN it.
Reply
#9

Guys, Already helped him over Team Viewer, No need anymore.
Reply
#10

Plz help me i need help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)