15
« le: 01 Novembre 2010, 17:12:14 »
Bonjour a tous,
Je post car la j'ai un gros soucis avec le GM de Génération-Street. LES PAYES SONT ENORMES ! 30 186 $ de paye au premier niveau ((^^))
Voici le code : public PayDay()
{
new string[256];
new account,interest;
new rent = 0;
if(weatherlimit > 0)
{
weatherlimit += 1;
}
if(weatherlimit == 2)
{
weatherlimit = 0;
}
if(lottolimit > 0)
{
lottolimit += 1;
}
if(lottolimit == 6)
{
lottolimit = 0;
}
for (new i=0; i<MAX_POINTS; i++)
{
PWarInfo[i][pwAnnounced] = 0;
if (PWarInfo[i][pwVulnerable] > 0)
{
PWarInfo[i][pwVulnerable]--;
UpdatePWarInfo();
}
}
gangRosterUpdate();
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
cock(i);
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "Vous avez échouer a payer votre paye , vous êtes en prison.");
GameTextForPlayer(i, "~r~Prisoner!", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerVirtualWorld(i, 2);
PlayerInfo[i][pInt] = 6;
PlayerInfo[i][pLocal] = 6;
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(string, sizeof(string), "Vous êtes en taule pour %d secondes.", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
new tmpintrate;
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
if(PlayerInfo[i][pPayDay] >= 5)
{
Tax += TaxValue;
PlayerInfo[i][pAccount] -= TaxValue;
if(PlayerInfo[i][pDonateRank] > 0)
{
new bonus = (PlayerInfo[i][pPayCheck]/100) * 10;
PlayerInfo[i][pPayCheck] += bonus;
}
new checks = PlayerInfo[i][pPayCheck];
new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
new randCheck = 10000 + random(89999);
if(PlayerInfo[i][pAccount] > 0)
{
PlayerInfo[i][pAccount] -= ebill;
}
else
{
ebill = 0;
}
new gangtax;
new taxpercent;
if(PlayerInfo[i][pMember] >= 20 && PlayerInfo[i][pMember] <= 40)
{
for(new g = 0; g < sizeof(GangInfo); g++)
{
if(GangInfo[g][hqGang] == PlayerInfo[i][pMember])
{
if(GangInfo[g][hqTaxBoy] > 0)
{
gangtax = (checks/100) * GangInfo[g][hqTaxBoy];
taxpercent = GangInfo[g][hqTaxBoy];
checks -= gangtax;
}
}
}
}
PlayerPaid[i] = 0;
PlayerRoutingCode[i] = randCheck;
PlayerPayment[i] = checks;
PlayerTribute[i] = gangtax;
interest = (PlayerInfo[i][pAccount]/786)*(tmpintrate);
PlayerPlayMusic(i);
PlayerInfo[i][pAccount] = account+interest;
SendClientMessage(i, COLOR_SACBLUE, "|___ SMS de votre banque ___|");
format(string, sizeof(string), " Paye: %s Taxe: -%s", ConvertToMoney(checks), ConvertToMoney(TaxValue));
SendClientMessage(i, COLOR_GRAD1, string);
if(gangtax > 0)
{
format(string, sizeof(string), " Argent Gang %d Pourcentage: -%s ", taxpercent, ConvertToMoney(gangtax));
SendClientMessage(i, COLOR_GRAD1, string);
}
if(PlayerInfo[i][pPhousekey] != 9999 || PlayerInfo[i][pPbiskey] != 9999)
{
format(string, sizeof(string), " Facture d'electricité: -%s", ConvertToMoney(ebill));
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Balance: %s", ConvertToMoney(account));
SendClientMessage(i, COLOR_GRAD1, string);
format(string, sizeof(string), " Taux d'intéret: 0.%d pourcent",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), " Intéret gagné %s", ConvertToMoney(interest));
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, COLOR_SACBLUE, "|----------------------------------|");
format(string, sizeof(string), " Nouvelle Balance: %s", ConvertToMoney(PlayerInfo[i][pAccount]));
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), " Loyer: -%s", ConvertToMoney(rent));
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), " Vous devez faire /signercheck %d pour depposer l'argent que vous avez gagné dans la banque.", randCheck);
SendClientMessage(i, COLOR_SACBLUE, string);
format(string, sizeof(string), "~y~Salaire ~n~~w~PAYER PAR CHÈQUE");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
if(PlayerInfo[i][pDonateRank] > 0)
{
PlayerInfo[i][pDonateRank] -= 1;
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* Vous n'avez pas joué asser lomptemp pour avoir la paye.");
}
}
}
}
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
C'est pourquoi je voudrais que vous m'éxpliquier comment régler la paye.
Merci D'avance,
Cordiallement,
Splash-WP