10.05.2018, 00:13
Quote:
Exemplo
PHP Code:
PHP Code:
PHP Code:
|
PHP Code:
stock CreateDroppedItem(Item, Amount, Float:gPosX, Float:gPosY, Float:gPosZ)
{
new f = MAX_OBJ+1;
for(new a = 0; a < MAX_OBJ; a++)
{
if(dItemData[a][ObjtPos][0] == 0.0)
{
f = a;
break;
}
}
if(f > MAX_OBJ) return;
dItemData[f][droptTimer] = gettime() + (30*60);//30 minutos para o item sumir
dItemData[f][ObjtData][0] = Item;
dItemData[f][ObjtData][1] = Amount;
dItemData[f][ObjtPos][0] = gPosX;
dItemData[f][ObjtPos][1] = gPosY;
dItemData[f][ObjtPos][2] = gPosZ;
dItemData[f][ObjtID] = CreateDynamicObject(Item, dItemData[f][ObjtPos][0], dItemData[f][ObjtPos][1], dItemData[f][ObjtPos][2]-1, 93.7, 120.0, random(360), -1, -1, -1, 80.0);
new buffer[50];
format(buffer, sizeof buffer, "Item: %s\nUnidade(s): %d", NomeItemID(dItemData[f][ObjtData][0]), dItemData[f][ObjtData][1]);
dItemData[f][textt3d] = CreateDynamic3DTextLabel(buffer, 0xAAAAAAAA, dItemData[f][ObjtPos][0], dItemData[f][ObjtPos][1], dItemData[f][ObjtPos][2]-1, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 80.0);
return;
}