FIXED: LARP | Hospital bug.
#1

Search for this:

pawn Код:
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
                    //SafeGivePlayerMoney(i, -cut);
                    format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, Have a nice day.", cut);
                    SendClientMessage(i, TEAM_CYAN_COLOR, string);
                    TogglePlayerControllable(i, 1);
                MedicBill[i] = 0;
                MedicTime[i] = 0;
                NeedMedicTime[i] = 0;
                PlayerInfo[i][pDeaths] += 1;
                PlayerFixRadio(i);
                ClearAnimations(i);
                SpawnPlayer(i);

Add under it:

pawn Код:
SetPlayerSpawn(i);
                    SetCameraBehindPlayer(i);
The full code:

pawn Код:
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
                    //SafeGivePlayerMoney(i, -cut);
                    format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, Have a nice day.", cut);
                    SendClientMessage(i, TEAM_CYAN_COLOR, string);
                    TogglePlayerControllable(i, 1);
                MedicBill[i] = 0;
                MedicTime[i] = 0;
                NeedMedicTime[i] = 0;
                PlayerInfo[i][pDeaths] += 1;
                PlayerFixRadio(i);
                ClearAnimations(i);
                SetPlayerSpawn(i);
                    SetCameraBehindPlayer(i);
Tried, works fine .

Enjoy


Reply
#2

You should post that in that script's topic not here
Reply
#3

Quote:
Originally Posted by $ЂЯĢ
You should post that in that script's topic not here
The script topic is in "Script Discussion" = 0.2X

This bug is only at 0.3a
Reply
#4

EDIT: Works
Reply
#5

Quote:
Originally Posted by _Ben_[Fux-c.co.il RP
]
Quote:
Originally Posted by $ЂЯĢ
You should post that in that script's topic not here
The script topic is in "Script Discussion" = 0.2X

This bug is only at 0.3a
The script topic is in "Script Discussion" = 0.2X || "Script Discussion" = 0.3
Reply
#6

Didnt work . Still respawns over and over.
Reply
#7

Thanks, it works!
Reply
#8

Quote:
Originally Posted by »Julian©NJRP™«
Didnt work . Still respawns over and over.
Worked for me.
Reply
#9

WAAAAAAAAT?! This is wierd that it doesnt work for me! :S here is where i putted it:
Код:
	  MedicTime[i] ++;
			  if(MedicTime[i] >= NeedMedicTime[i])
			  {
					new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
					//SafeGivePlayerMoney(i, -cut);
					format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, Have a nice day.", cut);
					SendClientMessage(i, TEAM_CYAN_COLOR, string);
					TogglePlayerControllable(i, 1);
			    MedicBill[i] = 0;
			    MedicTime[i] = 0;
			    NeedMedicTime[i] = 0;
			    PlayerInfo[i][pDeaths] += 1;
			    PlayerFixRadio(i);
			    ClearAnimations(i);
			    SpawnPlayer(i);
          SetPlayerSpawn(i);
          SetCameraBehindPlayer(i);

			  }
			}
and here is the hospital "Death":
Код:
	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, 50.0);
		  	SetPlayerInterior(playerid, 0);
		  	PlayerInfo[playerid][pInt] = 0;
	    	TogglePlayerControllable(playerid, 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;
	    	SetPlayerPos(playerid, -2685.5029,638.3383,14.4531);
	    	if(PlayerInfo[playerid][pDonateRank] > 0)
	    	{
	      	NeedMedicTime[playerid] = 10;
	    	}
	    	else
	    	{
	    		NeedMedicTime[playerid] = 10;
				}
		  	return 1;
			}
		}
		if(JustDied[playerid] == 1)
		{
		  if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
		  {
		    SetPlayerVirtualWorld(playerid, 0);
		    PlayerInfo[playerid][pVirWorld] = 0;
		  }
		  SetPlayerPos(playerid,-2685.5029,638.3383,14.4531);
		  SetPlayerFacingAngle(playerid, 270.0);
		  SetPlayerInterior(playerid,0);
		  PlayerInfo[playerid][pInt] = 0;
		  return 1;
		}
Reply
#10

Quote:
Originally Posted by _Ben_[Fux-c.co.il RP
]
Search for this:

pawn Код:
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
                    //SafeGivePlayerMoney(i, -cut);
                    format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, Have a nice day.", cut);
                    SendClientMessage(i, TEAM_CYAN_COLOR, string);
                    TogglePlayerControllable(i, 1);
                MedicBill[i] = 0;
                MedicTime[i] = 0;
                NeedMedicTime[i] = 0;
                PlayerInfo[i][pDeaths] += 1;
                PlayerFixRadio(i);
                ClearAnimations(i);
                SpawnPlayer(i);

Add under it:

pawn Код:
SetPlayerSpawn(i);
                    SetCameraBehindPlayer(i);
The full code:

pawn Код:
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
                    //SafeGivePlayerMoney(i, -cut);
                    format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, Have a nice day.", cut);
                    SendClientMessage(i, TEAM_CYAN_COLOR, string);
                    TogglePlayerControllable(i, 1);
                MedicBill[i] = 0;
                MedicTime[i] = 0;
                NeedMedicTime[i] = 0;
                PlayerInfo[i][pDeaths] += 1;
                PlayerFixRadio(i);
                ClearAnimations(i);
                SetPlayerSpawn(i);
                    SetCameraBehindPlayer(i);
Tried, works fine .

Enjoy


Please full code,
"Why? I did deleted this medic of code, because i hated that respawning bug. Now i want put back full code of fixed medic."
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)