SA-MP Forums Archive
After player death help - 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)
+--- Thread: After player death help (/showthread.php?tid=356071)



After player death help - PaulDinam - 02.07.2012

I put that after player dead that medic bill it's 1 and in setplayerspawn
i will show him a message and take him money

but it doesnt take
here is the code
Код:
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0 && PlayerInfo[playerid][pPrisoned] == 0)
		{
		    if(FirstSpawn[playerid] != 1)
		    {
				new string[256];
				new sendername[MAX_PLAYER_NAME];
				PlayerInfo[playerid][pDeaths] += 1;
				SetPlayerHealth(playerid, 25.0);
		    	SetPlayerInterior(playerid, 0);
		    	PlayerInfo[playerid][pInt] = 0;
				SetPlayerPos(playerid,1489.5615,-2624.0845,291.6370); // Warp the player
				SetPlayerFacingAngle(playerid, 269.6631);
	        	TogglePlayerControllable(playerid, 0);
	        	GiveCash(playerid, -500);
	        	sendername = GetPlayerNameEx(playerid);
	        	SendClientMessage(playerid, COLOR_BLUE, "[Hospital] Your medical bill comes to $500");
				MedicBill[playerid] = 0;
				FullResetPlayerWeapons(playerid);
	        	JustDied[playerid] = 1;
	        	MedicTime[playerid] = 1;
	        	if(PlayerInfo[playerid][pDonateRank] > 0)
	        	{
	            	NeedMedicTime[playerid] = 10;
	        	}
	        	else
	        	{
	        		NeedMedicTime[playerid] = 20;
				}
	        	PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
		    	return 1;
			}
		}