Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:pegaritem(playerid)
- {
- new Float:x, Float:y, Float:z, str[128];
- for(new i = 0; i < sizeof(DropItemSlot); i++)
- {
- GetDynamicObjectPos(DropItemSlot[i][DropItem], x,y,z);
- if(DropItemSlot[i][DropItem] != 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.5, x,y,z+1) && GetPlayerVirtualWorld(playerid) == DropItemSlot[i][Virtual] && GetPlayerInterior(playerid) == DropItemSlot[i][Interior])
- {
- if(!CheckInventario(playerid, DropItemSlot[i][DropItemID])) return SendClientMessage(playerid, COLOR_VERM, "[!] {FFFFFF}Sua mochila esta cheia.");
- GanharItem(playerid, DropItemSlot[i][DropItemID], DropItemSlot[i][DropItemUni]);
- format(str, 64, "{C2A2DA}*%s pegou um(a) %s do chao.", pName(playerid), ItemNomeInv(DropItemSlot[i][DropItemID]));
- ProxDetectorSilva(playerid, 12.0, 0xD7D7D7FF, str);
- DestroyDynamicObject(DropItemSlot[i][DropItem]);
- DestroyDynamic3DTextLabel(DropItemSlot[i][LabelItem]);
- DropItemSlot[i][DropItem] = 0;
- DropItemSlot[i][DropItemID] = -1;
- DropItemSlot[i][DropItemUni] = 0;
- DropItemSlot[i][Interior] = 0;
- DropItemSlot[i][Virtual] = 0;
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.1, 0, 0, 0, 0, 0, 1);
- return 1;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement