Avoid Looping - Scripting Quesiton
#1

Hello..
I finally fixed the spawn at hospital after death, but i'm standing with a bit of a problem.
When you die, the The Doctor paid your medical bill 'n shit..
And you /crack and it keeps cracking.. When you're about to spawn infront of hospital, it spawns in the bed, looping the script(?)
Or did i just miss something?
Код:
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 now ...", 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, 1182.5638,-1323.5256,13.5790);
		  SetPlayerFacingAngle(playerid, 270.0);
		  SetPlayerInterior(playerid,0);
		  PlayerInfo[playerid][pInt] = 0;
		  return 1;
EDIT: IT'S AN EDIT OF LA-RP
Reply
#2

Ehm... what?

Quote:

When you're about to spawn infront of hospital, it spawns in the bed, looping the script(?)

How shall it loop if there is no loop in your quoted code?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)