OnPlayerTakeDamage
#1

Hello, so i am trying to do this thing where there is a specific zone and if a cop shoots a civilian that has not committed a crime, his HP would stay where it was. I have an issue, that the player does become unkillable to the officer, but the HP goes down, up or stays. It does all of this, but the player does not die. I have no idea why its doing this.. Heres my code:

Код:
if(IsPlayerInDynamicArea(playerid, zones[0]))
	{
	    if(darbas[issuerid] == 5) //Check for if player is cop
	    {
	        if(GetPlayerSkin(issuerid) == 280) //if he has cop skin on
	        {
	            if(NusikaltesKaime[playerid] == 0)//check that player shot, does not have committed a crime
	            {
	                new Float:h;
             		GetPlayerArmour(playerid,h);
			SetPlayerArmour(playerid,h+amount);
	                GetPlayerHealth(playerid, h);
	                SetPlayerHealth(playerid, h+amount);
	                GameTextForPlayer(issuerid,"~<~ ~r~NEZUDYKITE CIVILIU ~>~",1000,5); //message that tells, to now kill civilians
	                return 0;
				}
			}
		}
	}
Do you guys know what could be the problem??
Reply


Messages In This Thread
OnPlayerTakeDamage - by Type-R - 27.05.2016, 17:45
Re: OnPlayerTakeDamage - by justjamie - 27.05.2016, 17:52
Re: OnPlayerTakeDamage - by Type-R - 28.05.2016, 14:19
Re: OnPlayerTakeDamage - by andrejc999 - 28.05.2016, 14:24
Re: OnPlayerTakeDamage - by Type-R - 28.05.2016, 14:38
Re: OnPlayerTakeDamage - by andrejc999 - 28.05.2016, 14:41
Re: OnPlayerTakeDamage - by Type-R - 28.05.2016, 15:54
Re: OnPlayerTakeDamage - by Stinged - 28.05.2016, 16:05

Forum Jump:


Users browsing this thread: 3 Guest(s)