[Ajuda] Descartar objeto no chгo
#12

Code:
    CMD:pitem(playerid)
    {
        if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 1;
        new f = MAX_OBJ+1;
        for(new a = 0; a < MAX_OBJ; a++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 1.8, dItemData[a][ObjtPos][0], dItemData[a][ObjtPos][1], dItemData[a][ObjtPos][2]))
            {
                f = a;
                break;
            }
        }
        if(f > MAX_OBJ) return 1;

        if(gettime() < GetPVarInt(playerid, #VarFlood8))
            return 1;
        SetPVarInt(playerid, #VarFlood8, gettime()+2);

        new bool:TemSlot = false;
        for(new i=0; i<75; i++)
        {
            if(InventarioInfo[playerid][i][iSlot] == 19382)
            {
                InventarioInfo[playerid][i][iSlot] = dItemData[f][ObjtData][0];
                InventarioInfo[playerid][i][iUnidades] = dItemData[f][ObjtData][1];
                TemSlot = true;
                break;
              }
        }
        if(!TemSlot)
        return SendClientMessage(playerid, 0xFF3080AA, "Seu inventбrio estб cheio!");
        new str[256];
        format(str, sizeof str, "Vocк pegou um item: %s, com %d unidade(s)", NomeItemID(dItemData[f][ObjtData][0]), dItemData[f][ObjtData][1]);
        SendClientMessage(playerid, 0xFF3080AA, str);
        DestroyDroppedObjectItem(f);
        SalvarInventario(playerid);
        ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle",4.1,0,1,1,0,0);
        return 1;
    }
Reply


Messages In This Thread
Descartar objeto no chгo - by igor97m - 08.05.2018, 00:21
Re: Descartar objeto no chгo - by AllanSG - 08.05.2018, 00:55
Re: Descartar objeto no chгo - by igor97m - 08.05.2018, 01:57
Re: Descartar objeto no chгo - by AllanSG - 08.05.2018, 02:05
Re: Descartar objeto no chгo - by igor97m - 08.05.2018, 02:26
Re: Descartar objeto no chгo - by AllanSG - 08.05.2018, 02:41
Re: Descartar objeto no chгo - by igor97m - 08.05.2018, 03:04
Re: Descartar objeto no chгo - by BrunoLuiz - 08.05.2018, 15:36
Re: Descartar objeto no chгo - by igor97m - 08.05.2018, 21:36
Re: Descartar objeto no chгo - by BrunoLuiz - 08.05.2018, 21:58
Re: Descartar objeto no chгo - by igor97m - 08.05.2018, 22:06
Re: Descartar objeto no chгo - by BrunoLuiz - 08.05.2018, 22:20
Re: Descartar objeto no chгo - by igor97m - 08.05.2018, 22:39

Forum Jump:


Users browsing this thread: 1 Guest(s)