02.09.2016, 20:58
And this if you need
pawn Код:
enum Drop_Data
{
DropItemID,
DropObj,
Text3D:DropLabel,
Float:dPosX,
Float:dPosY,
Float:dPosZ,
};
new DropInfo[MAX_DROPS][Drop_Data];
stock CreateDrop(itemid, Float:X, Float:Y, Float:Z)
{
if(itemid != -1)
{
for(new i; i < MAX_DROPS; i++)
{
if(DropInfo[i][dPosX] == 0.0 && DropInfo[i][dPosY] == 0.0 && DropInfo[i][dPosZ] == 0.0)
{
new str[100];
DropInfo[i][dPosX] = X, DropInfo[i][dPosY] = Y, DropInfo[i][dPosZ] = Z-0.92;
DropInfo[i][DropItemID] = itemid;
format(str, sizeof(str), "{FFFFFF}[{27E6E6}%s{FFFFFF}]\nPress [{27E6E6}C{FFFFFF}] {FFFFFF}to Pickup.", ItemInfo[itemid][Item_Name]);
DropInfo[i][DropLabel] = CreateDynamic3DTextLabel(str, -1, DropInfo[i][dPosX], DropInfo[i][dPosY], DropInfo[i][dPosZ], 1.5);
DropInfo[i][DropObj] = CreateDynamicObject(ItemInfo[itemid][Item_Obj], DropInfo[i][dPosX], DropInfo[i][dPosY], DropInfo[i][dPosZ], ItemInfo[itemid][Item_RotX], ItemInfo[itemid][Item_RotY], ItemInfo[itemid][Item_RotZ]);
return 1;
}
}
}
return 0;
}