SA-MP Forums Archive
Small Script problem - 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: Small Script problem (/showthread.php?tid=140728)



Small Script problem - mini-d - 10.04.2010

Hi guys i havnt scripted in a while so i decided to get back into ive been using VB so my knowledge is a bit rusty can someone help me clean up this bit of code
Код:
	new keys, updown, leftright;
	GetPlayerKeys(playerid, keys, updown, leftright);
	if (keys & KEY_FIRE)
	{
		for(new i, m = GetMaxPlayers(); i < m; i++)
		{
			if (!IsPlayerConnected(i)) continue;
			if (i == playerid) continue;
			if (IsPlayerAimingTargetBodyPart(playerid, i, BODY_PART_HEAD)) SetPlayerHealth(i, 0.0);
			else if
			( IsPlayerAimingTargetBodyPart(playerid, i, BODY_PART_LEGS)) SetPlayerHealth(i , 70.0);
			 ApplyAnimation(playerid,"PED","Lay_Bac_Loop",4.1,0,1,1,1,1);
			else
			( IsPlayerAimingTargetBodyPart(playerid, i, BODY_PART_LEGS)); SetPlayerHealth(i , 75.0);
			 SetPlayerArmedWeapon(i, 0);
		}
 }



Re: Small Script problem - RyDeR` - 10.04.2010

What do you mean with cleaning up?