[FilterScript] [FS]Spawn at hospital after death like in single player
#4

Quote:
Originally Posted by Wadabak
Usefull snippets topic?
No its for the Useless snippets topic
pawn Код:
#include <a_samp>

new Hspawn[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
  Hspawn[playerid] = 1;
    return 0;
}

public OnPlayerSpawn(playerid)
{

  if (Hspawn[playerid]==1)
    {
      if(GetPlayerMoney(playerid) > 100)
      {
          SetPlayerHealth(playerid, 50.5);
          SetPlayerPos(playerid,1176.6060,-1323.7875,14.0296);
          SendClientMessage(playerid,0xDD000096,"You spawned at the Los Santos hospital.");
          SendClientMessage(playerid,0xFFFFFF96,"|-----------------------------------|");
          SendClientMessage(playerid,0xDD000096,"Your medical bill cost: 100$");
            GivePlayerMoney(playerid,-100);
            return 1;
        }
    }
    return 1;
}
Better?

EDIT: Don't to you love the copy and paste indention
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)