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

Remove please.
Reply
#2

Usefull snippets topic?
Reply
#3

that will give you -100 $s no matter how much you got...
Reply
#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
#5

This could be in the useful ssnippets, but I think it's okay to put it there so new scripters can look at the script easily and learn from it. (Because Majority of new scripters search for FS and already made GMs, not small additions to their script) ~ Tht's what I think, though.

BTW TehKiller I like our sign
Reply
#6

You always loose atleast 100 bucks when you die , so maybe remove GivePlayerMoney(playerid,-100);
Reply
#7

Quote:
Originally Posted by whooper
that will give you -100 $s no matter how much you got...
True. Do it by GetPlayerMoney
Reply
#8

Quote:
Originally Posted by Proxan
You always loose atleast 100 bucks when you die , so maybe remove GivePlayerMoney(playerid,-100);
I don't see how that's a problem...

If you loose -100 when you don't have 100 then you go in debt anyway. Unless you want them to get the medical treatment for free...
Reply
#9

If you die in LV you spawn in LS?

Make it with zones..
Reply
#10

link is broken and i dont know how to use the copy and paste function... do i just copy the code and paste and sav it as HOS.amx? or what?
Reply
#11

Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by Wadabak
Usefull snippets topic?
EDIT: Don't to you love the copy and paste indention
IDk how t do it do i copy it and paste and save as .pwn? or .amx im really confused idk if its /amx or pwn and if it is dont i need both /amx and .pwn to use it? if so do i just copy the code and save it as Hospital.amx and copy the same code and save it as Hospital/pwn? or what?
Reply
#12

Quote:
Originally Posted by ElementTek
Quote:
Originally Posted by [HiC
TheKiller ]
Quote:
Originally Posted by Wadabak
Usefull snippets topic?
EDIT: Don't to you love the copy and paste indention
IDk how t do it do i copy it and paste and save as .pwn? or .amx im really confused idk if its /amx or pwn and if it is dont i need both /amx and .pwn to use it? if so do i just copy the code and save it as Hospital.amx and copy the same code and save it as Hospital/pwn? or what?

Open PAWNO press " new " mark all and delete... then go to this pastebin code mark all and select COPY and then go to PAWNO and press PASTE. Save it, name it " hos " in Filterscripts then compile it. Then go to server.cfg and add " hos " on end.
Reply
#13

Why's that a filterscript?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)