error 079: inconsistent return types (array & non-array)
#7

u should try this:
Код:
new GunObjectIDs[200] ={

   1575,  331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324, 325, 326, 342, 343, 344, -1,  -1 , -1 ,
   346, 347, 348, 349, 350, 351, 352, 353, 355, 356, 372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
   368, 369, 1575
};

stock GetGunObjectID(WeaponID)
{
    if (WeaponID < 0 || WeaponID > 64)
    {
        return 1575;
    }
    return GunObjectIDs[WeaponID];
}

stock DropGun(playerid,weaponid,weaponammo,Float:X,Float:Y,Float:Z,VirtualWorld,Interior)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    if(weaponid != 0 && weaponid != 0)
    {
        for(new i = 0; i < sizeof(wInfo); i++)
        {
            if(wInfo[i][GunPosX] == 0.0 && wInfo[i][GunPosY] == 0.0 && wInfo[i][GunPosZ] == 0.0)
            {
                wInfo[i][GunAmount][0] = weaponid;
                wInfo[i][GunAmount][1] = weaponammo;
                wInfo[i][GunPosX] = X;
                wInfo[i][GunPosY] = Y;
                wInfo[i][GunPosZ] = Z;
                wInfo[i][GunWorld] = VirtualWorld;
                wInfo[i][GunInterior] = Interior;
                PickupGun(weaponid);
		GunObject[i] = CreateDynamicObject(GetGunObjectID(weaponid), X, Y, Z-1, 80.0, 0.0, 0.0, VirtualWorld);
                return 1;
            }
        }
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)