12.09.2014, 08:44
So when I am on top of a island which I used to create by using ID 17143, I can't hit another player. But I am able to hit on normal San Andreas land. Any fix?
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_FIRE)
{
if(IsPlayerConnected(playerid) && GetPlayerTargetPlayer(playerid) != INVALID_PLAYER_ID)
{
if(IsPlayerInRangeOfPoint(playerid, 100.0, x, y, z))
{
new i = GetPlayerTargetPlayer(playerid);
new Float: dmgamount;
GetPlayerHealth(i, dmgamount);
SetPlayerHealth(i, dmgamount - 5);
return true;
}
}
}
return true;
}
You can script the melee damaging in script-wise how-ever(I'm assuming...),
Maybe this will work? pawn Код:
|