17.07.2014, 11:02
Is there any possible way to detect model ID of an object you are shooting at? I tried to script this and it returned wrong IDs. I suspect it's caused by combining normal objects with dynamic objects... but I'm not sure.
Here's the code:
Here's the code:
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if (hittype == BULLET_HIT_TYPE_PLAYER_OBJECT)
{
new string[50];
format(string, 50, "objectid: %d", hitid);
SendClientMessage(playerid, -1, string);
new model = Streamer_GetIntData(STREAMER_TYPE_OBJECT, hitid, E_STREAMER_MODEL_ID);
format(string, 50, "model: %d", model);
SendClientMessage(playerid, -1, string);
}
return 1;
}

