Weird money problem.
#6

Create a new file in pawno, select everything and replace it with the code below:
Код:
// --- Fixes.inc Money Fixer ----------------- By: suicidal.banana
// Quick and dirty fix for money bug of fixes.inc, because why not
#include <a_samp>

new playerMoneyValues[MAX_PLAYERS],
    moneyFixDelay = 2500; // 1000 = 1 second

forward FixPlayerMoney(playerid);

public OnFilterScriptInit() {
    print("\n-=[ fixes.inc money fixer loaded! ]=-\n");
    return 1;
}
public FixPlayerMoney(playerid) {
    if(playerMoneyValues[playerid] && (playerMoneyValues[playerid] != 0)) {
        GivePlayerMoney(playerid, playerMoneyValues[playerid]);
    }
    return 1;
}
public OnPlayerSpawn(playerid) {
    SetTimerEx("FixPlayerMoney", moneyFixDelay, false, "i", playerid);
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
    playerMoneyValues[playerid] = GetPlayerMoney(playerid);
    return 1;
}
public OnPlayerDisconnect(playerid, reason) {
    playerMoneyValues[playerid] = 0;
    return 1;
}
public OnFilterScriptExit() {
    print("\n-=[ fixes.inc money fixer unloaded! ]=-\n");
    return 1;
}
Save it as filterscripts/fixes-inc-money-fixer.pwn, and compile it.
Now open your server.cfg file, find the filterscripts line and add fixes-inc-money-fixer too the end of it. Save and close the server.cfg file, start your server, go test.

If it works, hooray, if it doesn't work, try finetune the moneyFixDelay value at the top of the script
Reply


Messages In This Thread
Weird money problem. - by b3nz - 30.06.2015, 20:47
Re: Weird money problem. - by kloning1 - 30.06.2015, 23:22
Re: Weird money problem. - by Dizzle - 01.07.2015, 06:44
Re: Weird money problem. - by Sithis - 01.07.2015, 07:04
Re: Weird money problem. - by b3nz - 01.07.2015, 22:42
Re: Weird money problem. - by Suicidal.Banana - 01.07.2015, 23:46
Re: Weird money problem. - by Abagail - 01.07.2015, 23:52
Re: Weird money problem. - by Suicidal.Banana - 01.07.2015, 23:55
Re: Weird money problem. - by b3nz - 02.07.2015, 09:47
Re: Weird money problem. - by Suicidal.Banana - 02.07.2015, 10:35

Forum Jump:


Users browsing this thread: 2 Guest(s)