25.03.2017, 10:54
Hello there,
Once again i am stuck on my Inventory system.
(Might be released soon as filterscript)
I have two questions regarding dropping and picking up an item.
I really have no idea, how i make the object pickupable.
Can anybody give me an example of this?
Maybe by creating some kind of invisible pickup and make it respond on the model ID?
Example of dropping an 9mm:
Can anybody give me an example of this?
Also i have a question about dropping the object.
When dropping the object it spawns in the middle of the air.
How do i make it actually lie on the ground?
Screenshots:
Thanks in advance!
Once again i am stuck on my Inventory system.
(Might be released soon as filterscript)
I have two questions regarding dropping and picking up an item.
I really have no idea, how i make the object pickupable.
Can anybody give me an example of this?
Maybe by creating some kind of invisible pickup and make it respond on the model ID?
Example of dropping an 9mm:
PHP код:
if(modelid == 346)
{
new str[128];
format(str,sizeof(str),"%s(%i) has dropped a 9mm from his inventory.",PlayerName(playerid),playerid);
SendNearbyMessage(playerid,30.0,str,ORANGE);
RemoveItem(playerid,modelid);
ShowInventoryDrop(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateDynamicObject(modelid, X, Y, Z, 0, 0, 178);
}
Also i have a question about dropping the object.
When dropping the object it spawns in the middle of the air.
How do i make it actually lie on the ground?
Screenshots:
Thanks in advance!