04.10.2014, 18:11
Try this.
(Also, are you sure Prop[playerid] is an object id?)
(Also, are you sure Prop[playerid] is an object id?)
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(GetPlayerTeam(playerid) == team_hunter) // No need for a loop, as playerid is in OnPlayerWeaponShot
{
if(hittype == BULLET_HIT_TYPE_PLAYER_OBJECT)
{
foreach(new i : Player)
{
if(hitid == Prop[i]) // Are you sure Prop[MAX_PLAYERS] (Prop[i]) is assigned to an object?
{
SetPlayerHealth(i, 0);
SendClientMessage(i, -1, "Test");
break;
}
}
}
}
return 1;
}