[BUG/SCRIPT PROBLEM]Respawning at hospital multipal after death.
#1

Hey guys .. ive modified my script from v2 to v3 Beta client and i got a simple problem . When i die or someone dies they get respawned to hospital over and over and it wont end .
Here is the hospital code:
Код:
		if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
		{
		  if(FirstSpawn[playerid] != 1)
		  {
		  	/*new string[256];
		  	new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
				SafeGivePlayerMoney(playerid, -cut);
				format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
				SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
				MedicBill[playerid] = 0;
				MedicTime[playerid] = 0;
				NeedMedicTime[playerid] = 0;*/
				PlayerInfo[playerid][pDeaths] += 1;
				SetPlayerHealth(playerid, 45.0);
		  	PlayerInfo[playerid][pInt] = 0;
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have been critically wounded and have been rushed to the hospital");
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You must spend some time resting here to heal your wounds");
	    	JustDied[playerid] = 1;
	    	MedicTime[playerid] = 1;
	    	if(PlayerInfo[playerid][pDonateRank] > 0)
	    	{
	      	NeedMedicTime[playerid] = 5;
	    	}
	    	else
	    	{
	    		NeedMedicTime[playerid] = 5;
				}
		  	return 1;
			}
		}
		if(JustDied[playerid] == 1)
		{
		  if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
		  {
		    SetPlayerVirtualWorld(playerid, 0);
		    PlayerInfo[playerid][pVirWorld] = 0;
		  }
		  SetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
		  SetPlayerFacingAngle(playerid, 270.0);
		  SetPlayerInterior(playerid,0);
		  PlayerInfo[playerid][pInt] = 0;
		  return 1;
		}
Yes it's a GF edit.
Reply
#2

Sorry double posting, but what can it be?

pawn Код:
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
        {
          if(FirstSpawn[playerid] != 1)
          {
            /*new string[256];
            new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
                SafeGivePlayerMoney(playerid, -cut);
                format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
                SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
                MedicBill[playerid] = 0;
                MedicTime[playerid] = 0;
                NeedMedicTime[playerid] = 0;*/

                PlayerInfo[playerid][pDeaths] += 1;
                SetPlayerHealth(playerid, 25.0);
            SetPlayerInterior(playerid, 3);
            PlayerInfo[playerid][pInt] = 3;
            rand = random(sizeof(gMedicSpawns));
                SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
                SetPlayerFacingAngle(playerid, 0);
            TogglePlayerControllable(playerid, 0);
            GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest...", 30000, 3);
            JustDied[playerid] = 1;
            MedicTime[playerid] = 1;
            ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
            if(PlayerInfo[playerid][pDonateRank] > 0)
            {
            NeedMedicTime[playerid] = 30;
            }
            else
            {
                NeedMedicTime[playerid] = 40;
                }
            PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
            return 1;
            }
        }
        if(JustDied[playerid] == 1)
        {
          if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
          {
            SetPlayerVirtualWorld(playerid, 0);
            PlayerInfo[playerid][pVirWorld] = 0;
          }
          SetPlayerPos(playerid, 1243.7305,330.5660,19.5547);
          SetPlayerFacingAngle(playerid, 270.0);
          SetPlayerInterior(playerid,0);
          PlayerInfo[playerid][pInt] = 0;
          return 1;
        }
Reply
#3

Hey guys i have the same problem here and it sucks you are allways at the hospital and it sucks i think its a bug with the old time it i ges its a new timer or somthing dont know yet
Reply
#4

i see the problem well atleast i think i do

Код:
if(JustDied[playerid] == 1)
		{
		  if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
		  {
		    SetPlayerVirtualWorld(playerid, 0);
		    PlayerInfo[playerid][pVirWorld] = 0;
		  }
		  SetPlayerPos(playerid, 1243.7305,330.5660,19.5547);
		  SetPlayerFacingAngle(playerid, 270.0);
		  SetPlayerInterior(playerid,0);
		  PlayerInfo[playerid][pInt] = 0;
          JustDied[playerid] = 0; // reset the value after they have died
		  return 1;
		}
i think tht should sort the problem but i only looked over it quickly
Reply
#5

Doesn't work, same thing.
Reply
#6

The timer is bugged i know why becouse 0.3 has a new timer or im wrong? If anyone got 0.3 timer , please post it.
Reply
#7

Quote:
Originally Posted by »Julian©NJRP™«
The timer is bugged i know why becouse 0.3 has a new timer or im wrong? If anyone got 0.3 timer , please post it.
Nope you are right i ges i have read about it some where i think it was on wiki i dont know..
Reply
#8

There is no such thing as "new 0.3 timer" it works in this same way like it did in 0.2x. There must be something wrong in your gamemode.
Reply
#9

no your just not changing it right if you did the time would work, plus this should be in the GF topic?
Reply
#10

Well the thing is that it works fine in 0.2 but in 0.3 its bugged nothing happens when you die you are still left in the hospital..
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)