SA-MP Forums Archive
[HELP] Hospital - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Hospital (/showthread.php?tid=153076)



[HELP] Hospital - joeri55 - 07.06.2010

I'm using the GTA Roleplay edit of LA-RP.
http://forum.sa-mp.com/index.php?topic=138237.825

The guy who made the edit ain't responding to questions anymore because he ain't using the script anymore. I've tried to use the LA-RP hospital code but I complied it and a bunch of errors appeared.

I copied the LA-RP Medictime into the GTA RP's one and that loaded up well so that's good replaced. But then I wanted to use the MedicBill out of LA-RP into mine it didn't work..

The LA-RP script:
Код:
		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;
		}
My script the GTA-RP one:
Код:
		if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
		{
		  if(FirstSpawn[playerid] != 1)
		  {
		  	//new string[256];
		  	new cut = deathcost;
				SafeGivePlayerMoney(playerid, -cut);
				MedicBill[playerid] = 0;
				MedicTime[playerid] = 0;
				NeedMedicTime[playerid] = 0;
				SetPlayerToTeamColor(playerid);
				SetPlayerPos(playerid,1612.3240,-2330.1670,14.5469);
				SetPlayerFacingAngle(playerid, 0);
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
				/*SetPlayerHealth(playerid, 50.0);
				PlayerInfo[playerid][pDeaths] += 1;
		  	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 I delete the /* this happends:
Код:
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3576) : error 017: undefined symbol "gMedicSpawns"
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3576) : error 029: invalid expression, assumed zero
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3576) : warning 215: expression has no effect
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3577) : error 017: undefined symbol "gMedicSpawns"
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3577) : warning 215: expression has no effect
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3577) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3577) : error 029: invalid expression, assumed zero
C:\Documents and Settings\JD\Bureaublad\GTARP\gamemodes\gtarp.pwn(3577) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
If anyone has a idea to fix this, please comments below!

Thanks for the help already.



Re: [HELP] Hospital - coole210 - 07.06.2010

Line 3577 please.


Re: [HELP] Hospital - joeri55 - 07.06.2010

Quote:
Originally Posted by Coole[AG
]
Line 3577 please.
This is line 3577:

Код:
				SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player



Re: [HELP] Hospital - joeri55 - 07.06.2010

I already fixed it I forgot to remove the */ at
Код:
new Float:gMedicSpawns[3][3] = {
{348.9868,165.0690,1014.6947},
{348.8042,162.5563,1014.6947},
{348.8767,159.9840,1014.6947}
};
Thanks for helping anyways!