07.05.2017, 22:28
Hey guys...Iam new in Scripting...I have some factions like vampire , Werewolf and etc...I want Vampires to have powerful punch...But i dont know how can i set if vampire punches someone, his Hp gets more low...
I need to know how can i get that Vampire's Faction....
So alittle help...
This is my code
I need to know how can i get that Vampire's Faction....
So alittle help...
This is my code
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(PlayerInfo[playerid][pFaction] == 8 || PlayerInfo[playerid][pFaction] == 9)//Here is the Problem cuz its only for player who takes Damage..Not for the one who gives damage...
{
new Float:hp;
if(weaponid == 0)
{
GetPlayerHealth(playerid, hp), hp-=30, SetPlayerHealth(playerid, hp);
}
}
return 1;
}