Posts: 30
Threads: 14
Joined: Jul 2008
Reputation:
0
Hey
I've got 1 bug
Almost got my GM finished, but there is one thing my mate told me(i've check it, he's right)
When you die, The money is resetted
Me and my mates check the whole OnPlayerDeath, OnPlayerSpawn
We weren't able to find any suggestions why the money is resetted
Can somebody help me?
Tell me what you need to get it fixed (no, I won't post the full gamemode)
Posts: 740
Threads: 63
Joined: Oct 2009
Reputation:
0
Can you post OnPlayerDeath ?
Posts: 740
Threads: 63
Joined: Oct 2009
Reputation:
0
Do you use any anticheat?
Posts: 30
Threads: 14
Joined: Jul 2008
Reputation:
0
Nope, I don't
I've got a Register/login system, but that only saves on disconnect and load in login if I am right
Posts: 740
Threads: 63
Joined: Oct 2009
Reputation:
0
It looks weird dude! I cant think any other reason that happens
Posts: 30
Threads: 14
Joined: Jul 2008
Reputation:
0
All filterscripts are off, I've double checked it
I think there is something else in my script wich bugs, but can't find it
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
OnPlayerStateChange maybe? Or OnPlayerInteriorChange.
Could basically be anything that gets called when a player dies, other than OnPlayerDeath.
Posts: 30
Threads: 14
Joined: Jul 2008
Reputation:
0
public OnPlayerSave(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
new string3[32];
new pname3[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname3, sizeof(pname3));
format(string3, sizeof(string3), "%s.ini", pname3);
new File: pFile = fopen(string3, io_write);
if (pFile)
{
new var[32];
format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
fclose(pFile);
new File: hFile = fopen(string3, io_append);
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "FirstAidKit=%d\n",PlayerInfo[playerid][pMedicKit]);fwrite(hFile, var);
fclose(hFile);
}
}
}
return 1;
}
how about that?