Posts: 24
Threads: 5
Joined: Dec 2008
Reputation:
0
Well, everytime people crash / die or respawn, they lose all their money, anyone know how to fix this? Since my playerbase is quiet high and its a major bug.
Posts: 24
Threads: 5
Joined: Dec 2008
Reputation:
0
OnPlayerDeath or which one?
Posts: 19
Threads: 1
Joined: May 2006
Reputation:
0
hm. I'v got the same bug. And there's no money reset after player death or spawn in script...
Posts: 2,200
Threads: 14
Joined: Apr 2009
Reputation:
0
Save the money to a variable then and give it to the player on spawn. Reset the money before giving it just in case
Posts: 24
Threads: 5
Joined: Dec 2008
Reputation:
0
Uhm, could u guide me a bit more pl0x? Like how to do it etc..
Posts: 19
Threads: 1
Joined: May 2006
Reputation:
0
ok, I've made it and test it. Works fine.
at the top of script:
new money[MAX_PLAYERS];
------------------
OnPlayerConnect:
money[playerid] = 0;
-------------------------
OnPlayerDeath:
money[playerid] = GetPlayerMoney(playerid);
----------------------------
OnPlayerSpawn:
GivePlayerMoney(playerid,money[playerid]);
that will save your money summ after death and give it after spawn
Posts: 24
Threads: 5
Joined: Dec 2008
Reputation:
0
Hmm, when i /kill, my money goes up double , but then goes back to 0?