28.04.2016, 11:35
(
Последний раз редактировалось SaiyanZ; 28.04.2016 в 13:00.
)
Hello,
I was trying to make something like attaching object to only one weapon, Heres the code it attaches the object but it dosn't Destroy it if i switch weapon, Please see if anything is wrong:
I was trying to make something like attaching object to only one weapon, Heres the code it attaches the object but it dosn't Destroy it if i switch weapon, Please see if anything is wrong:
PHP код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid)== 24)
{
SetPlayerAttachedObject(playerid, 0, 339, 9);
}
else
{
DestroyObject(playerid, 0);
}
return 1;
}