#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        new initmoney; //Makes player money a varible.
    initmoney = GetPlayerMoney(playerid); Saves players money into a variable.
    if(initmoney >0) { // If money is greater than 0
        GivePlayerMoney(playerid, -initmoney); // Give player money -Initmoney (will set to 0)
    }
    return 1;
}
This will not reset debts, meaning if you have negative money and you die, you still have negative money.

Also, when you die, it should already make you lose weapons. If not, just add ResetPlayerWeapons(playerid); before the first "}".
Reply


Messages In This Thread
Drop - by Ondracec - 15.03.2011, 22:40
Re: Drop - by austin070 - 15.03.2011, 22:42
Re: Drop - by Ondracec - 15.03.2011, 22:54
Re: Drop - by austin070 - 15.03.2011, 22:56

Forum Jump:


Users browsing this thread: 1 Guest(s)