Help Me With This
#1

Can anyone help me with this codes? There must be a Text shows "Hero Field" and Remove Weapons on Zombies when it hits that Advanced Hero near that Advanced Hero.

Код:
if(team[issuerid] == TEAM_HUMAN)
{
	if(pInfo[issuerid][pHumanClass] == ADVANCEDHERO)
	{
		if(team[playerid] == TEAM_ZOMBIE)
		{
			new Float:x, Float:y, Float:z;
			GetPlayerPos(issuerid, Float:x, Float:y, Float:z);
			if(IsPlayerInRangeOfPoint(playerid, 3.0, Float:x, Float:y, Float:z))
			{
				if(weaponid == 9)
				{
					GameTextForPlayer(playerid, "~g~Hero Field", 1000, 3);
					ResetPlayerWeapons(playerid);
				}
			}
		}
	}
}
I need help AS FAST AS POSSIBLE. I don't need a bad comment nor disclaimers.
Reply
#2

Please, use a less generic title next time, otherwise nobody is gonna open your post.

When is that code executed? OnPlayerDeath?
Also, unrelated to your problem, I suggest you to use the and operator (&&) instead of making multiple nested ifs except when it is necessary.
Reply
#3

Sorry for it. BTW, I fixed this. Please close this thread.

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)