One last single bug, I hope
#1

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)
Reply
#2

Can you post OnPlayerDeath ?
Reply
#3

http://pastebin.com/ihRTUGQQ = On Player Death
Reply
#4

Do you use any anticheat?
Reply
#5

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
Reply
#6

It looks weird dude! I cant think any other reason that happens
Reply
#7

Quote:
Originally Posted by tour15
It looks weird dude! I cant think any other reason that happens
Filterscripts?
Check the OnPlayerDeath on the filterscripts you use.
Reply
#8

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
Reply
#9

OnPlayerStateChange maybe? Or OnPlayerInteriorChange.
Could basically be anything that gets called when a player dies, other than OnPlayerDeath.
Reply
#10

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)