OnPlayerDeath bug
#1

Hey guys i have Problem in OnPlayerdeath when i die all my Money Go to restart and go to 0$

Please help me
Full OnPlayerDeath
http://pastebin.com/CK4nmCdn
Reply
#2

pawn Код:
//(...)
     ResetPlayerMoneyEx(playerid);
     #undef killerid
     #undef reason
     return 1;
}
Quite certain ResetPlayerMoneyEx causes it.
Reply
#3

There are a lot of custom function and no one's going to read it.
Anyway, show the code of the function GivePlayerMoneyEx.
Reply
#4

You loose $100 upon death as you do in singleplayer:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
      GivePlayerMoney(playerid, 100);
      return 1;
}
Source: http://forum.sa-mp.com/showpost.php?...83&postcount=3
Reply
#5

Quote:
Originally Posted by Abagail
Посмотреть сообщение
You loose $100 upon death as you do in singleplayer:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
      GivePlayerMoney(playerid, 100);
      return 1;
}
Source: http://forum.sa-mp.com/showpost.php?...83&postcount=3
He says his money is reset.
Reply
#6

PHP код:
stock ResetPlayerMoneyEx(playerid)
{
    if(
IsValidPlayer(playerid))
    {
        
PlayerInfo[pMoney][playerid]=0;
        return 
ResetPlayerMoney(playerid);
    }
    return 
0;
}
stock GetPlayerMoneyEx(playerid)
{
    if(
IsValidPlayer(playerid))
    {
        new 
money=GetPlayerMoney(playerid);
         if(
money<PlayerInfo[pMoney][playerid] || !ServerVariables[ANTI_MONEYHACK])
              return 
money;
        return 
PlayerInfo[pMoney][playerid];
    }
    return 
0;

Reply
#7

Bump!
Reply
#8

Bump!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)