13.02.2015, 00:23
It detected a headshot and chest shot when I shot them in the leg with a desert eagle...Why would this happen?
Is there something wrong with my code or is it a SAMP problem?
This is all under OnPlayerTakeDamage.
Is there something wrong with my code or is it a SAMP problem?
This is all under OnPlayerTakeDamage.
pawn Код:
if(bodypart == 3)
{
TextDrawShowForPlayer(playerid,TorsoBlTD);
if(TorsoBl[playerid] < 5)
{
TorsoBl[playerid] ++;
printf("Hits %d", TorsoBl[playerid]);
if(IsMaxDamageWep(weaponid) == 1)
{
BodyPartAmount[playerid][3] = 6;
}
else if(IsMaxDamageWep(weaponid) == 0)
{
BodyPartAmount[playerid][3] = 3;
}
}
}
if(bodypart == 4)
{
TextDrawShowForPlayer(playerid,GroinBlTD);
if(GroinBl[playerid] < 5)
{
GroinBl[playerid] ++;
printf("Hits %d", GroinBl[playerid]);
if(IsMaxDamageWep(weaponid) == 1)
{
BodyPartAmount[playerid][4] = 3;
}
else if(IsMaxDamageWep(weaponid) == 0)
{
BodyPartAmount[playerid][4] = 1;
}
}
}
if(bodypart == 5)
{
TextDrawShowForPlayer(playerid,LArmBlTD);
if(LArmBl[playerid] < 5)
{
LArmBl[playerid] ++;
if(IsMaxDamageWep(weaponid) == 1)
{
BodyPartAmount[playerid][5] = 1;
new num = RandomEx(1,5);
if(num == 3)
{
TextDrawHideForPlayer(playerid,LArmBlTD);
TextDrawShowForPlayer(playerid,LArmBlab);
LArmBr[playerid] = 1;
}
}
else if(IsMaxDamageWep(weaponid) == 0)
{
BodyPartAmount[playerid][5] = 1;
}
}
}
if(bodypart == 6)
{
TextDrawShowForPlayer(playerid,RArmBlTD);
if(RArmBl[playerid] < 5)
{
RArmBl[playerid] ++;
if(IsMaxDamageWep(weaponid) == 1)
{
BodyPartAmount[playerid][6] = 2;
new num = RandomEx(1,5);
if(num == 2)
{
TextDrawHideForPlayer(playerid,RArmBlTD);
TextDrawShowForPlayer(playerid,RArmBlab);
RArmBr[playerid] = 1;
}
}
else if(IsMaxDamageWep(weaponid) == 0)
{
BodyPartAmount[playerid][6] = 1;
}
}
}
if(bodypart == 7)
{
TextDrawShowForPlayer(playerid,LLegBlTD);
if(LLegBl[playerid] < 5)
{
LLegBl[playerid] ++;
if(IsMaxDamageWep(weaponid) == 1)
{
BodyPartAmount[playerid][7] = 2;
new num = RandomEx(1,5);
if(num == 2)
{
TextDrawHideForPlayer(playerid,LLegBlTD);
TextDrawShowForPlayer(playerid,LLegBlab);
LLegBr[playerid] = 1;
}
}
else if(IsMaxDamageWep(weaponid) == 0)
{
BodyPartAmount[playerid][7] = 1;
}
}
}
if(bodypart == 8)
{
TextDrawShowForPlayer(playerid,RLegBlTD);
if(RLegBl[playerid] < 5)
{
RLegBl[playerid] ++;
if(IsMaxDamageWep(weaponid) == 1)
{
BodyPartAmount[playerid][8] = 1;
new num = RandomEx(1,5);
if(num == 2)
{
TextDrawHideForPlayer(playerid,RLegBlTD);
TextDrawShowForPlayer(playerid,RLegBlab);
RLegBr[playerid] = 1;
}
}
else if(IsMaxDamageWep(weaponid) == 0)
{
BodyPartAmount[playerid][8] = 1;
}
}
}