03.09.2016, 22:16
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_OBJECT)
{
if(IsValidObject(hitid))
{
for(new a; a < sizeof(Veados); ++a)
{
if(hitid == Veados[a])
{
GetObjectPos(Veados[a], x, y, z);
new Float: distancia = GetPlayerDistanceFromPoint(playerid, x, y, z);
GivePlayerMoney(playerid, floatround(distancia));
new msg[100];
DestroyObject(hitid);
format(msg, sizeof(msg), "vocк matou o veado com a arma id %i, o veado id %i - %i", weaponid, hitid, Veados[a]);
SendClientMessage(playerid, -1, msg);
break;
}
}
}
}
return 1;
}