SA-MP Forums Archive
onplayerdeath - 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: onplayerdeath (/showthread.php?tid=600692)



onplayerdeath - Karolukas123 - 11.02.2016

hey, why system don't skip first part of script if he false ?

Код:
	
if(playerData[playerid][DMZONE])
	{
		if(playerData[killerid][GuyInDMONE])
		{
			SetPlayerPos(killerid, -62.0927,2473.2788,16.4844);
	       	SetPlayerPos(playerid, -62.0927,2473.2788,16.4844);
		}
		else if(playerData[killerid][GuyInDMTWO])
		{

			SetPlayerPos(killerid, -62.0927,2473.2788,16.4844);
	       	SetPlayerPos(playerid, -62.0927,2473.2788,16.4844);
		}
		else if(!playerData[playerid][DMZONE])
		{
			print("else if DMZONE false skip DMZONE true and move to hospital");
			playerData[playerid][HPTIME] = 60;
			playerData[playerid][HPINSITE]= 1;
			MoveToHospital(playerid);
		}
	}
	return 1;



Re: onplayerdeath - Karolukas123 - 12.02.2016

any solutions ?


Re: onplayerdeath - Adeon - 12.02.2016

if(playerData[playerid][DMZONE])
{
if(playerData[killerid][GuyInDMONE])
{
SetPlayerPos(killerid, -62.0927,2473.2788,16.4844);
SetPlayerPos(playerid, -62.0927,2473.2788,16.4844);
}
else if(playerData[killerid][GuyInDMTWO])
{

SetPlayerPos(killerid, -62.0927,2473.2788,16.4844);
SetPlayerPos(playerid, -62.0927,2473.2788,16.4844);
}
}
else if(!playerData[playerid][DMZONE])
{
print("else if DMZONE false skip DMZONE true and move to hospital");
playerData[playerid][HPTIME] = 60;
playerData[playerid][HPINSITE]= 1;
MoveToHospital(playerid);
}
return 1;


Re: onplayerdeath - K0P - 12.02.2016

Код:
if(playerData[playerid][DMZONE])
	{
		if(playerData[killerid][GuyInDMONE])
		{
			SetPlayerPos(killerid, -62.0927,2473.2788,16.4844);
	       	SetPlayerPos(playerid, -62.0927,2473.2788,16.4844);
		}
		if(playerData[killerid][GuyInDMTWO])
		{

			SetPlayerPos(killerid, -62.0927,2473.2788,16.4844);
	       	SetPlayerPos(playerid, -62.0927,2473.2788,16.4844);
		}
		if(!playerData[playerid][DMZONE])
		{
			print("else if DMZONE false skip DMZONE true and move to hospital");
			playerData[playerid][HPTIME] = 60;
			playerData[playerid][HPINSITE]= 1;
			MoveToHospital(playerid);
		}
	}
	return 1;
Please +Rep if it worked