Whats wrong in thissss -
kingforyou - 19.03.2010
This is the orginal payday public its compiled everything good
Код:
public PayDay()
{
new string[128];
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
GameTextForPlayer(i, "~r~Busted!", 2000, 1);
SetPlayerInterior(i, 6);
PlayerInfo[i][pInt] = 6;
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
SafeResetPlayerWeapons(i);
SafeResetPlayerMoney(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
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 != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(i))
{
PlayerInfo[i][pPhousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[i][pDonateRank] > 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][pDonateRank] > 0)
{
new bonus = PlayerInfo[i][pPayCheck] / 10;
checks += bonus;
}
new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
//ConsumingMoney[i] = 1;
//SafeGivePlayerMoney(i, checks);
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] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
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;
RacketsTime = 1;
//CaptureTime = 1;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
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][pDonateRank] > 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();
Checkprop();
return 1;
}
But when i add this:
Код:
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
if(PlayerInfo[i][pRank] == 1)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $1000");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 2)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $1500");
GivePlayerMoney(i,1500);
}
else if(PlayerInfo[i][pRank] == 3)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $2000");
GivePlayerMoney(i,2000);
else if(PlayerInfo[i][pRank] == 4)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $2500");
GivePlayerMoney(i,2500);
}
else if(PlayerInfo[i][pRank] == 5)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $3000");
GivePlayerMoney(i,3000);
}
else if(PlayerInfo[i][pRank] == 6)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $3500");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 7)
{
SendClientMessage(plaiyerid,COLOR_BLUE,"Police Department: $4000");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 8)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $7000");
GivePlayerMoney(i,7000);
}
}
its doesnt work after i add this its looks like this:
Код:
public PayDay()
{
new string[128];
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
GameTextForPlayer(i, "~r~Busted!", 2000, 1);
SetPlayerInterior(i, 6);
PlayerInfo[i][pInt] = 6;
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
SafeResetPlayerWeapons(i);
SafeResetPlayerMoney(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
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 != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(i))
{
PlayerInfo[i][pPhousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[i][pDonateRank] > 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][pDonateRank] > 0)
{
new bonus = PlayerInfo[i][pPayCheck] / 10;
checks += bonus;
}
new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
//ConsumingMoney[i] = 1;
//SafeGivePlayerMoney(i, checks);
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] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
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);
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
if(PlayerInfo[i][pRank] == 1)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $1000");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 2)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $1500");
GivePlayerMoney(i,1500);
}
else if(PlayerInfo[i][pRank] == 3)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $2000");
GivePlayerMoney(i,2000);
else if(PlayerInfo[i][pRank] == 4)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $2500");
GivePlayerMoney(i,2500);
}
else if(PlayerInfo[i][pRank] == 5)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $3000");
GivePlayerMoney(i,3000);
}
else if(PlayerInfo[i][pRank] == 6)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $3500");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 7)
{
SendClientMessage(plaiyerid,COLOR_BLUE,"Police Department: $4000");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 8)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $7000");
GivePlayerMoney(i,7000);
}
}
format(string, sizeof(string), "~y~PayDay~n~~w~Check paid into your account");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
RacketsTime = 1;
//CaptureTime = 1;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
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][pDonateRank] > 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();
Checkprop();
return 1;
}
I get those errors you dont need the lines i think because when i delete the script that i add to the payday the errors disapeered
Код:
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(1818) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(1847) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(1884) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(1885) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(1913) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2384) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2395) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2407) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2411) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2423) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2427) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2431) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2435) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2439) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2443) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2447) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2451) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2463) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2467) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2471) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2475) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2479) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2491) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2495) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2499) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\гег\My Documents\Downloads\samp03asvr_R4_win32\gamemodes\gtarp.pwn(2511) : error 004: function "PlayerToPoint" is not implemented
Re: Whats wrong in thissss -
02manchestera - 19.03.2010
try adding one more } at the very end
Re: Whats wrong in thissss -
ACERS - 19.03.2010
[quote=kingforyou ]
This is the orginal payday public its compiled everything good
But when i add this:
Код:
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
if(PlayerInfo[i][pRank] == 1)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $1000");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 2)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $1500");
GivePlayerMoney(i,1500);
}
else if(PlayerInfo[i][pRank] == 3)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $2000");
GivePlayerMoney(i,2000);
}
else if(PlayerInfo[i][pRank] == 4)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $2500");
GivePlayerMoney(i,2500);
}
else if(PlayerInfo[i][pRank] == 5)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $3000");
GivePlayerMoney(i,3000);
}
else if(PlayerInfo[i][pRank] == 6)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $3500");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 7)
{
SendClientMessage(plaiyerid,COLOR_BLUE,"Police Department: $4000");
GivePlayerMoney(i,1000);
}
else if(PlayerInfo[i][pRank] == 8)
{
SendClientMessage(i,COLOR_BLUE,"Police Department: $7000");
GivePlayerMoney(i,7000);
}
}
Try that one. You missed a bracket at
else if(PlayerInfo[i][pRank] == 3)