Money and Respawning
#4

Under which function are you giving them the money? Is it under OnPlayerSpawn? If so, you need to make a variable and assign it values when they die. For example:
pawn Код:
// At the top:
new pDied[MAX_PLAYERS] = 0; //or whatever you want to name it
public OnPlayerSpawn(playerid)
{
     if(!pDied[playerid])
     {
         GivePlayerMoney(playerid, 1000);
     }
     if(pDied[playerid])
     {
         pDied[playerid] = 0;        
      }
  return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    GivePlayerMoney(playerid, -100);
    pDied[playerid] = 1;
    return 1;
}
Reply


Messages In This Thread
Money and Respawning - by Brickwood - 20.10.2010, 10:45
Re: Money and Respawning - by ••• ĤБĶБM ••• - 20.10.2010, 10:47
Re: Money and Respawning - by Brickwood - 20.10.2010, 10:50
Re: Money and Respawning - by randomkid88 - 20.10.2010, 14:53
Re: Money and Respawning - by Badger(new) - 20.10.2010, 15:26
Re: Money and Respawning - by Dj_maryo1993 - 20.10.2010, 16:03
Re: Money and Respawning - by Hiddos - 20.10.2010, 16:06
Re: Money and Respawning - by ••• ĤБĶБM ••• - 20.10.2010, 17:16

Forum Jump:


Users browsing this thread: 6 Guest(s)