OnPlayerTakeDamge problem.
#1

I wanted to make a anti clan shoot system , but i does not work.
What is the problem?

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
	    new string[256];
	    new clanfile[256];
	    format(clanfile, sizeof(clanfile), "/Clan/user/%s.ini",dini_Get("/Clan/AllUserID.ini",Name(playerid)));
	    new clanfile1[256];
	    format(clanfile1, sizeof(clanfile1), "/Clan/user/%s.ini",dini_Get("/Clan/AllUserID.ini",Name(issuerid)));
	    if(strcmp(dini_Get(clanfile,"PlayerClan"), dini_Get(clanfile1,"PlayerClan")))
	    {
	        return 1;
	    }
	    else
	    {
		    new Float:HP;
		    GetPlayerHealth(playerid, HP);
		    SetPlayerHealth(playerid,HP - 0);
	            SendClientMessage(issuerid,COLOR_RED,"[CLAN] {FFFFFF}Do not shoot your clan member.");
	    }
	}
	return 1;
}
Reply


Messages In This Thread
OnPlayerTakeDamge problem. - by JawsPlus - 20.04.2016, 10:09
Re: OnPlayerTakeDamge problem. - by Manyula - 20.04.2016, 13:09
Re: OnPlayerTakeDamge problem. - by HydraHumza - 20.04.2016, 13:32
Re: OnPlayerTakeDamge problem. - by JawsPlus - 21.04.2016, 05:44
Re: OnPlayerTakeDamge problem. - by Manyula - 21.04.2016, 07:29
Re: OnPlayerTakeDamge problem. - by AdrianG - 21.04.2016, 14:17

Forum Jump:


Users browsing this thread: 1 Guest(s)